0

So I have an excel file. I have a number of formula in the file. I set the calculation mode of the file to Manual. I save the file to a db by converting to a filestream.

var fileStream = new FileStream(path, FileMode.Open);
var binaryReader = new BinaryReader(fileStream);
var bytes = binaryReader.ReadyBytes(convert.ToInt32(new FileInfo(path).Length));

However when I convert it to an Excel file using the Syncfusion tool, the Formula Calculation Mode is always set to Automatic which makes me think that this is lost when saving it to the DB.

Is there another way of converting to Binary that I could use that would maintain this state of the file?

Fiona
  • 1,599
  • 5
  • 24
  • 38
  • Why do you need a tool to "convert" it back to an Excel file? It is already an Excel file, just pull the bytes for the file from the db and write them to a file on the disk. I'm guessing the problem is with the tool you are using. The binary reader simply pulls the existing bytes from the file into an array of bytes. – Kevin Aug 17 '16 at 16:09
  • I can't write to disk. ( a shall we call it restriction being placed on me) so I need to load the data as an Excel file into memory. (using the Syncfusion tool) – Fiona Aug 17 '16 at 16:26
  • I still think the Syncfusion tool is what is flipping that bit on you. The act of reading the bytes from the file will simply give you whatever bytes are found there. – Kevin Aug 17 '16 at 16:39
  • Thanks Kevin for the confirmation. It was what I suspected and I've a post in the syncfusion Forum on this. Hoping they'll be able to clear it up for me. – Fiona Aug 17 '16 at 16:46

1 Answers1

0

The issue with ”CalculationMode is not applied proper” has been fixed recently in Syncfusion.XlsIO.Base and the fix will be included in our upcoming release, which will be rolled out in the end of August 2016.

For further questions please contact our support team at support@syncfusion.com to get a prompt assistance on this.