M
Mehul
Hello,
I am trying to upload a new excel workbook to Sharepoint and for that I need
the ability to somehow obtain a byte array out of the workbook. I can do it
if the workbook is first saved to the hard drive and then I can do something
like:
String sFilePath = "C:\\tempWhatIfModel.xls";
FileStream fs = File.OpenRead(sFilePath);
byte[] file = new byte[fs.Length];
fs.Read(file, 0, file.Length);
fs.Close();
The above approach however requires that the file exists on the C:. But, I
dont know how to do this for a new workbook.
Any help will be trememndously appreciated.
Thanks.
I am trying to upload a new excel workbook to Sharepoint and for that I need
the ability to somehow obtain a byte array out of the workbook. I can do it
if the workbook is first saved to the hard drive and then I can do something
like:
String sFilePath = "C:\\tempWhatIfModel.xls";
FileStream fs = File.OpenRead(sFilePath);
byte[] file = new byte[fs.Length];
fs.Read(file, 0, file.Length);
fs.Close();
The above approach however requires that the file exists on the C:. But, I
dont know how to do this for a new workbook.
Any help will be trememndously appreciated.
Thanks.