Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Symbol in Excel export

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I have a problem when exporting tables into either txt or csv format files.

After the final row of information the following symbol is evident in the csv or txt file.


I need to get rid of this as the exported information is then used to input information into another system and this symbol would cause errors......

The code I use to ouput the tables for csv is.....

exportspreadsheet(":pRIV:purcOrder_1.db", "C:\\Conv\\Purchase Orders(New).csv", False )

The code I use to ouput the tables for csv is.....

exportASCIIVar ( ":pRIV:WorkOrder_1.db", "C:\\Conv\\WorkOrder(New).txt", "\t", "", False, True )

I have checked the tables and there are no blank rows at the end or anything else which would give me a clue....

Can anyone help?

Thanks,

Woody
 
Woody,

I'm not certain, but I seem to recall that there can be an extra CR or LF character at the end of exported tables. Most applications ignore this, assuming correctly that it is a blank line.

Some however (and I *believe* Excel is one of them) don't realize this and try to display the character. However, since there's no symbol in the corresponding character set, it appears as the box.

About the only way I can think of would be to roll your own export routine using TCursors and the FileSystem class. It sounds like a lof of work, but it goes quickly. For an idea, please see the run() event shown in which shows how to export memo fields to text files.

FWIW, this extra character is pretty common when using text files to transfer data.

Hope this helps...

-- Lance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top