This is a migrated thread and some comments may be shown as answers.

Export string to excel (and stays string)

2 Answers 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Marco
Top achievements
Rank 1
Marco asked on 02 Oct 2008, 01:50 AM
Hello,

I can not find any solutions for the next problem.

In my datagrid i have a column with values like 001, 002, 003, etc..
The values must stay like they are, string values. (all the other data in the column is also string.)
When i export to excel the values become 1, 2, 3, etc..

My question is, how can i managed to let the values stay strings, when i export to excel.


2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 03 Oct 2008, 07:43 AM
Hi,

You can try wrapping the cell contents with   tags as suggested in the following forum link.
Leading Zero's - Export to Excel

Thanks
Princy.
0
Marco
Top achievements
Rank 1
answered on 03 Oct 2008, 09:36 AM
Hello,

I have tried that, but then i get a (unwanted) space character, in front of the data.
(So the data to export is not equal anymore, with the real data)

I had a little hope  that there was a better way then this.

Thanks for the reply,
Marco
Tags
Grid
Asked by
Marco
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Marco
Top achievements
Rank 1
Share this question
or