Hello Hailey,
Thanks for your inquiry.
I simulated an Excel file and tested the following code, but I did not reproduce your issue. If you are using an older version, we recommend you upgrade to the latest version (the latest version is
Spire.XLS Pack(Hotfix) Version:11.9.3) and try it again.
- Code: Select all
Workbook workbook = new Workbook();
workbook.LoadFromFile("test.xlsx");
MemoryStream outStream = new MemoryStream();
workbook.SaveToStream(outStream, " ");
File.WriteAllBytes("result.txt", outStream.ToArray());
If there are still any issues, to help us investigate further, please provide us with your input file and your test code. You can upload them here or send them to us (
support@e-iceblue.com) via email. Thanks in advance.
Besides, our Spire.XLS does not support saving a workbook stream to .txt format in UTF8 encoding, but we support saving a worksheet stream to .txt format in UTF8 encoding (As shown below).
- Code: Select all
workbook.Worksheets[0].SaveToStream(outStream, " ",Encoding.UTF8);
Sincerely,
Brian
E-iceblue support team