Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Wed Apr 29, 2020 9:49 pm

I am trying to process a spreadsheet with line feed/carriage return (CRLF) characters in a cell. There is a considerable amount of text in the cell as well. I'm converting the Excel spreadsheet to tab delimited text with:

sheet.SaveToFile(processFile, "\t", Encoding.UTF8);

The resulting text file has placed CRLF characters in the text file splitting the row into two rows. However, it appears to happen at 1024 characters. Is there any way to ensure that these rows don't get split by the CRLF's?
Last edited by velocedge on Thu Apr 30, 2020 3:38 pm, edited 1 time in total.

velocedge
 
Posts: 2
Joined: Sat Mar 09, 2019 3:40 pm

Thu Apr 30, 2020 3:42 am

Hello,

Thanks for your inquiry.
To help us investigate your issue more accurately and quickly, please provide your input file, your full code as well as your output file. You could send them to us(support@e-iceblue.com via email. Thanks in advance.

Sincerely,
Rachel
E-iceblue support team
User avatar

rachel.lei
 
Posts: 1571
Joined: Tue Jul 09, 2019 2:22 am

Thu Apr 30, 2020 3:25 pm

I will do that but in preparing the files, I noticed that it's not cut at the CRLF but at an arbitrary location about 1,016 characters and 8 paragraph marks... that's 1024 characters. Is there a limit on the size of a cell when it's exported to text? I'll email the files but thought this sounded like a crazy coincidence.

velocedge
 
Posts: 2
Joined: Sat Mar 09, 2019 3:40 pm

Fri May 01, 2020 2:54 am

Hello Steve,

Thanks for providing your files and code via email.
I converted your xls file to txt file by MS Excel and got the same result as I converted with our Spire.XLS. Our Spire.XLS follows MS Excel’s standard. I am afraid that we cannot change the function to meet your requirement. Hope you can understand that.

Sincerely,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2766
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.XLS