Board index » delphi » Exporting data to a text file with unusual field data

Exporting data to a text file with unusual field data

I am exporting selected rows from a database to a pipe ("|") delimited text
file to be imported by the user into MS Excel.

The problem is that some of the fields have data separated by blank lines.
When they do this it makes the spreadsheet data go into other fields.
Evidently, the blank lines causes the speadsheet to see each part of the
field as a new field.

Do you have a work around to keep the data from these unusual cells in one
cell?

 

Re:Exporting data to a text file with unusual field data


Quote
"James Rose" <j.r...@ssss.com> wrote in message

news:3cbc359b$1_1@dnews...

Quote
> I am exporting selected rows from a database to a pipe ("|")
delimited text
> file to be imported by the user into MS Excel.

> The problem is that some of the fields have data separated by
blank lines.
> When they do this it makes the spreadsheet data go into other
fields.
> Evidently, the blank lines causes the speadsheet to see each
part of the
> field as a new field.

> Do you have a work around to keep the data from these unusual
cells in one
> cell?

Have you tried enclosing the text within quotes in the output
file?

Woody (TMW)

Re:Exporting data to a text file with unusual field data


Try to replace any CRLF characters to some anothers (or even remove) during
export.
As alternative, you can use my SMExport - data will be exported directly in
MS Excel spreadsheet without installed MS Excel.

--
With best regards, Mike Shkolnik
E-Mail: mshkol...@scalabium.com
WEB: http://www.scalabium.com

James Rose <j.r...@ssss.com> D??? ???Y??:3cbc359b$1_1@dnews...

Quote
> I am exporting selected rows from a database to a pipe ("|") delimited
text
> file to be imported by the user into MS Excel.

> The problem is that some of the fields have data separated by blank lines.
> When they do this it makes the spreadsheet data go into other fields.
> Evidently, the blank lines causes the speadsheet to see each part of the
> field as a new field.

> Do you have a work around to keep the data from these unusual cells in one
> cell?

Other Threads