1
私はxlsファイルのBase64文字列を持っています。私はbase64でストリーム を開こうとすると、それは次の例外をスローしBase64 ExcelファイルストリームAspose.Cells.CellsException
Aspose.Cells.CellsException:このファイルの形式がサポートされていないか、正しい形式を指定しないでください。
public Stream ConvertFileToStream(string fileBase64)
{
var fileAsBytes = Convert.FromBase64String(fileBase64);
Stream stream = new MemoryStream(fileAsBytes);
return stream;
}
public void Open(Stream fileSource)
{
FileFormatUtil.DetectFileFormat(fileSource);
_workbook = new Workbook(fileSource);
}