Q: When I try to save an excel file with odd characters like é, è, â etc ... in the file name, it works if I save it directly on disk but if I use something like:
excel.Save("André.xls", SaveType.OpenInExcel, FileFormatType.Default, Me.Response)
It gives me the very odd filename André.xls.'''
A: When you use OpenInExcel or OpenInBrowser option, the file name characters should be US-ASCII. It's not limited by Aspose.Cells, but HTTP protocols. You can refer to rfc2183. It says:
2.3 The Filename Parameter
Current [RFC 2045] grammar restricts parameter values (and hence Content-Disposition filenames) to US-ASCII. We recognize the great desirability of allowing arbitrary character sets in filenames, but it is beyond the scope of this document to define the necessary mechanisms.
Q: Everything works completely fine using the trial edition, but we get errors when we use the Professional edition. Error message shows when generated file is opened in MS Excel. When I remove the pictures in the designer file, there is no error message. According to Edition Types webpage on your site, there is full support for pictures in the Professional version. Is that a bug?
A: The pictures in your file are ole objects copyed from other office documents. They not images inserted from file. You can verify this by following step:
- Cut your picture from the file
- Paste it in MS Paint
- Save the image in a file
- Insert the image into your file
Then you can try your program again and can see this issue is solved.
Please check edition type of Aspose.Cells, Ole Objects are supported in Enterprise Edition for they are totally different from normal images inserted from file.
You can try the work around to solve this problem. Or please upgrade to Enterprise edition.
Q: I use the following code to set cell's style:
Excel excel1 = new Excel();
//Do something here
...
Excel excel2 = new Excel();
int styleIndex = excel2.Styles.Add();
Style styleHeading = excel2.Styles[styleIndex];
styleHeading.Name = "Heading";
styleHeading.Font.IsBold = true;
...
excel1.Worksheets[0].Cells["A1"].Style = excel2.Styles["Heading"];
excel1.Save("c:\\book1.xls", FileFormatType.Default);
But the formatting is lost in the created file.
A: The Style objects should be created in the same Excel object as Cell objects. So please change your code to:
int styleIndex = excel1.Styles.Add();
Style styleHeading = excel1.Styles[styleIndex];
styleHeading.Name = "Heading";
styleHeading.Font.IsBold = true;
...
excel1.Worksheets[0].Cells["A1"].Style = excel1.Styles["Heading"];
Q: How many rows and columns can I have for an Excel sheet in Aspose.Cells ?
A: Well, In a single worksheet, you can have 65536 rows and 256 columns for an XLS file (MS Excel 97-2003), you can have 1048576 rows and 16384 columns for an XLSX file (MS Excel 2007). It is to be noted here, these limitations are only set by different versions of MS Excel and do not concern Aspose.Cells in any respect.