Welcome! Log In Create A New Profile

Advanced

How to export a table to excel by displayed column subscript?

Posted by Jenny.pcs.crosspost 
Jenny.pcs.crosspost
How to export a table to excel by displayed column subscript?
September 19, 2008 04:09PM
When I display a table and move the position of columns, I want to export this table to Excel file and I want to keep the order of columns displayed. However the exported excel file is always following the created table column subscript, not the displayed table column subscript. Is there any easy way to export the table by displayed table column subsript? Thanks

Message forwarded from pcsoft.us.windev
marcel.berman@managingbusiness.be.pcs
Re: How to export a table to excel by displayed column subscript?
September 19, 2008 05:31PM
Hi !


On 19-Sep-2008, Jenny <lizziezou@hotmail.com> wrote:

> When I display a table and move the position of columns, I want to export
> this table to Excel file and I want to keep the order of columns
> displayed. However the exported excel file is always following the created
> table column subscript, not the displayed table column subscript. Is there
> any easy way to export the table by displayed table column subsript?
> Thanks

what you could do is to create a tab delimited file (that you easily open in
excel) by storing each line of the table in string and then save this string
in a file.
Something like :

LOCAL
sContent is string
sFile is string = CompleteDir(fExeDir())+"Excel.xls"
// yes ! you'll get an error when opening the file, but if you continue it
// will be ok !
nLine is int = 0

FOR ALL ROW OF TABLE_Table1
nLine++
sContent += [CR] + TABLE_Table1[nLine]
END
fSaveText(sFile,sContent)
ShellExecute(sFile)

Hope that it will help you !


--
Marcel Berman
Président de Be-Dev.be (www.be-dev.be) (Belgique)
Membre du CA de Wind'Asso (www.windasso.org) (France)
Be-Dev.be et Wind'Asso sont des associations d'utilisateurs des produits
PC-Soft
Message forwarded from pcsoft.us.windev
marcel.berman@managingbusiness.be.pcs
Re: How to export a table to excel by displayed column subscript?
September 19, 2008 05:31PM
ooops !
My last proposal does not work ! Sorry !

--
Marcel Berman
Président de Be-Dev.be (www.be-dev.be) (Belgique)
Membre du CA de Wind'Asso (www.windasso.org) (France)
Be-Dev.be et Wind'Asso sont des associations d'utilisateurs des produits
PC-Soft
Message forwarded from pcsoft.us.windev
Jenny.pcs.crosspost
Re: How to export a table to excel by displayed column subscript?
September 19, 2008 06:06PM
Thank you anyway.

Is it reasonable if windev could automatically export the file to excel by table display column subscripts instead of table create column subscripts?

Message forwarded from pcsoft.us.windev
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: