geargolum — 2011-03-27T08:03:37-04:00 — #1
When exporting data from a listview (web form) to excel one of the fields is a long type and and numerical suffix get added. Is there a way to have the full number appear without the suffix?
wwb_99 — 2011-03-27T12:58:11-04:00 — #2
How are you exporting the data?
geargolum — 2011-03-27T13:08:23-04:00 — #3
I have a function that receives a generic list and then creates a csv file.
when I open it it Excel a value of 30000000000 will be displayed has 3E+12
wwb_99 — 2011-03-28T13:24:46-04:00 — #4
That would be scientific notation and it is all on excel's end of the world. And it is pretty tricky to get around if you have to pass in flat files, such as CSV, as there is no way to indicate that it should show this column as a number with format X. To get past it, you'll need some better ways of generating excel. I recommend either CarlosAG's excel xml writer or using the excellent excelpackage library.
That is a function of the way excel formats data without any input -- which is what happens when you have
geargolum — 2011-03-29T07:35:45-04:00 — #5
Thank you for the info.
After doing some research I found a way of making it work.
I check if the value is of type long and convert it to a string.
("=""" & value.ToString & """") will display the full number.