Please could you confirm some functionality before I download Aspose.Cells for .NET and test using your free trial.
I am developing web applications using VS2008 and need to automate the creation of an excel spreadsheet that will be saved onto the webserver. The format is very specific and will need to be automatically filled from multiple datasets. I also need to automate embedding of multiple .xls files into the spreadsheet.
Could you also please confirm the pricing/license I would need for one developer and to deploy this product to one production web server.
Thank you for your help.
Regards
This message was posted using Email2Forum by ShL77.
I have downloaded the trial version and have managed to embed two excel documents into and existing excel file. The embedded documents open in a new workbook (as expected), but they are unfortunately also opening in the worksheet they are embedded on.
Sample code following:-
'Get the required worksheet. Dim sheet As Worksheet = workbook.Worksheets(1) 'Define a string variable to store the image path. Dim ImageUrl As String = Server.MapPath(“Images\ExcelIcon.gif”) '“C:\Development\VS2005Projects\WebSite2\Images\ExcelIcon.gif” 'Get the picture into the streams. Dim fs As FileStream = File.OpenRead(ImageUrl) 'Define a byte array. Dim imageData(fs.Length) As Byte 'Obtain the picture into the array of bytes from streams. fs.Read(imageData, 0, imageData.Length) 'Close the stream. fs.Close() 'Get an excel file path in a variable. Dim path As String = “C:\temp\ContactTest.xls” Dim path2 As String = “C:\temp\Test.xls” 'Get the file into the streams. fs = File.OpenRead(path) 'Define an array of bytes. Dim objectData(fs.Length) As Byte 'Store the file from streams. fs.Read(objectData, 0, objectData.Length) 'Get the file into the streams. fs = File.OpenRead(path2) 'Define an array of bytes. Dim objectData2(fs.Length) As Byte 'Store the file from streams. fs.Read(objectData2, 0, objectData2.Length) 'Close the stream. fs.Close() 'Add an Ole object into the worksheet with the image 'shown in MS Excel. sheet.OleObjects.Add(3, 2, 20, 22, imageData) sheet.OleObjects.Add(12, 2, 20, 22, imageData) 'Set embedded ole object data. sheet.OleObjects(0).ObjectData = objectData sheet.OleObjects(1).ObjectData = objectData2 'Save As the excel file. workbook.Save(“c:\temp\out_My_Book2.xls”)
Please could you advise how to only open the embedded documents in a new workbook.
For some reason when the Excel files are embedded they are embedding as EMBED(“Document”,“”) and so are opening as a document inside the existing spreadsheet as well as opening in a new workbook.
I need the Excel files to embed as EMBED(“Worksheet”,“”) as the embedded files will only open as a new workbook and not also inside the existing spreadsheet.
I found the following thread that defines the FileType:-
but when i set sheet.OleObjects(0).FileType = OleFileType.Xls the embedded object message ‘Cannot start the source application for this object’ when double clicked.
I tested the ObjectData FileType and it is returning ‘Unknown’.
Also is there a way to set a caption with the embedded image?
For some reason when the Excel files are embedded they are embedding as EMBED(“Document”,“”) and so are opening as a document inside the existing spreadsheet as well as opening in a new workbook.
I need the Excel files to embed as EMBED(“Worksheet”,“”) as the embedded files will only open as a new workbook and not also inside the existing spreadsheet.
Now when you open the generated file into MS Excel, you will see EMBED(“Worksheet”,“”) selecting the object in the sheet. Moreover, currently the excel file would also open into the same spreadsheet too. This is because we do not use “Display as icon” feature as in the case with MS Excel. We will check the feasibility of this feature and get back to you soon.
JulieB:
but when i set sheet.OleObjects(0).FileType = OleFileType.Xls the embedded object message ‘Cannot start the source application for this object’ when double clicked.
I don’t find this problem using the latest version’s dll “Aspose.Cells.dll”.
JulieB:
I tested the ObjectData FileType and it is returning ‘Unknown’.
I don’t find this problem too, the ole object’s file type is Xls if we set it as: sheet.OleObjects(0).FileType = OleFileType.Xls in the code.
JulieB:
Also is there a way to set a caption with the embedded image?
You can use sheet.OleObjects[0].Name property to set the caption.
in VS2008 and it behaves as you described opening into the same spreadsheet too. My error only occurs now in VS2005, so that is not an issue.
Please could you provide a time frame for the “Display as icon” feature, as it is one of the behaviours I need to be able to push through the purchase of this product.
Also using the sheet.OleObjects[0].Name seems to set the name of the object but not a caption below the image. Is this also a feature that would come with the “Display as icon”?
Please try the attached version, we have added a new attribute i.e…, OleObject.DisplayAsIcon (boolean attribute) in this version v4.8.0.1 for the issue. Please try it and let us know if this supports your need.
And, we could not understand the line i.e.., "Also using the sheet.OleObjects[0].Name seems to set the name of the
object but not a caption below the image. Is this also a feature that would
come with the "Display
as icon"?"
Could you elaborate and give us more details, we will check it soon.
Please could you confirm some functionality before I download Aspose.Cells for .NET and test using your free trial.
I am developing web applications using VS2008 and need to automate the creation of an excel spreadsheet that will be saved onto the webserver. The format is very specific and will need to be automatically filled from multiple datasets. I also need to automate embedding of multiple .xls files into the spreadsheet.
Could you also please confirm the pricing/license I would need for one developer and to deploy this product to one production web server.
Thank you for your help.
Regards
This message was posted using Email2Forum by ShL77.
The answer to the query was already replied with details. The latest version also does support all the functionality of older versions with enhancements.
We recommend you to kindly browse documents in different sections of Aspose.Cells for Wiki Conf. Docs for your complete reference: