Entering multible lines into a single cell in Excel

sander7sander7 Member Posts: 10
Hi there,

I'm trying to export the content of Comment Line into a single cell in Excel using the Excel Buffer.

To achieve this i've done the following:
- Added a boolean-field to the excel-buffer, that tells me that this cell is multiline. (i didn't want to modify the Excel Buffer, to include a Line No. in the primary key, as i think i will f... other features up by that.)
- Created a new table, with the same primary key as Excel Buffer, and also a Line No. in the key. (kind of like a header/line relationship)
- Changed the code on function CreateSheet, in a way so that it loops through my new table, if the boolean-field i mentioned is set to TRUE.

As long as i only export a few lines, everything works fine.
However at some point, i seem to reach a limit in the amount of data i can put into a single cell. This limit is significantly less than i can into a cel, if i type it manually.

I hope this is because i use a wrong method, and that somehow i can get it to work, if only i knew wich method to use.
Right now i do it like this:
REPEAT
XlWrkSht.Range(xlColID + xlRowID).Value := FORMAT(XlWrkSht.Range(xlColID + xlRowID).Value) +
ExcelBuffMultiLineRec."Cell Value as Text" + FORMAT(CRLF);
UNTIL ExcelBuffMultiLineRec.NEXT = 0;
Anyone out there who can help me?
My guess is that there is an upper limit to the amount of data i can put into XlWrkSht.Range(x + y).Value.
Is there a XlWrkSht.Range(x + y).ValueAdd method?

TIA
// Alexander
Regards,

Alexander Pallesen
Freelance Navision Developer
Sign In or Register to comment.