Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fast data transfer into Excel avoiding date problems
Message
From
03/07/2003 12:12:24
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00805939
Message ID:
00806606
Views:
27
In theory, importing from CSV, indeed, seems better to me. I also suspect you can insert it into any place.

Try if you can pre-format the column, where you will insert the CSV, as text.

>Thanks for the reply Hilmar,
>
>While preformatting the columns as text and using the clipboard to paste the data into Excel fixes the problem where some data was converted into dates and numbers, it still has all the trailing spaces. This means I still must include an extra step to strip the spaces back out.
>
>Also even 2 Ghz PCs with 1GB of Ram can get choked putting 6-10 million values in the clipboard. Therefore, I am drifting away from solutions that involve loading all of the data into the clipboard at the same time.
>
>Anyway, I keep coming back to the conclusion that using a .CSV file is still my best solution since I am dealing with large amounts of data. Also, I should point out that the problem data will only potientially occur in a couple of columns.
>
>My current approach is to make a .CSV file that looks like:
>
>="problem column", "etc..."
>="0123", "etc..."
>="12-1", "etc..."
>="7440-09-7", "etc..."
>
>When Excel opens the .CSV file, it sees the extra "=" prefix character so it evaluates the expression and displays the data as text. Granted, if you click on the cell, you see things like ="0123" which might be annoying to some, but I could always copy the column and repaste it back in as values if necessary.
>
>I am still interested however if anyone has other solutions that I have overlooked.
>
>Thanks,
>Jeff
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform