Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-08

XMLXSDExport: line ending in Excel cells

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Reinier Olislagers

Hi list,

I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on testing.

I'd appreciate your input.
In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as 
 So far so good.

If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need to convert to 

1. Carriage return + linefeed (#13#10)
2. Linefeed (#10)
3. All occurrences of #10 and #13#10
4. Value of LineEnding constant

My reasoning: it shouldn't matter on which platform you're accessing a database, so we should treat both #13#10 and #10 equally, so I'd choose option 3.

Your thoughts?

Thanks,
Reinier

Reply by email

Reinier Olislagers
to Reinier Olislagers
Reinier Olislagers wrote 11 lines
In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as 
 So far so good. If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need to convert to 
 1. Carriage return + linefeed (#13#10) 2. Linefeed (#10) 3. All occurrences of #10 and #13#10 4. Value of LineEnding constant

Well, seems I had to drink more coffee.


 is line feed encoded in XML. So it doesn't matter, I can just strip out the #13s - still working on getting those pesky Alt-enters correctly imported into Excel but it's probably something very stupid...

Reinier

Reply by email

Unknown author
to Reinier Olislagers: I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on…
Reinier Olislagers wrote 22 lines
Hi list, I've been refactoring the XMLXSDExport code and am now busy fixing some bugs based on testing. I'd appreciate your input. In Excel text fields, you can generate a line ending by pressing Alt-Enter. On export to XML this is written as 
 So far so good. If exporting dataset text (memo, string, ..) data to Excel XML text fields, which characters do I need to convert to 
 1. Carriage return + linefeed (#13#10) 2. Linefeed (#10) 3. All occurrences of #10 and #13#10 4. Value of LineEnding constant My reasoning: it shouldn't matter on which platform you're accessing a database, so we should treat both #13#10 and #10 equally, so I'd choose option 3. Your thoughts?

Make it a property of the converter.

Michael.

Reply by email