Product confirmation - Aspose.Cells for .NET

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.

Hi,

Thanks for your inquiry.

Well, I think Aspose.Cells for .NET can fulfil your requirement. You can read/write different MS Excel (97-2007) formats including XLS, XLSX/XLSM, csv, tab delimited, SpreadsheetML, see the documents: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/opening-files.html , http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/saving-files.html Moreover, you may directly save to PDF format using the component, see the document: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/converting-to-pdf-files-net.html You can import export data to and from a variety of data sources, See the documents: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/importing-data-to-worksheets.html , http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/exporting-data-from-worksheets.html

For combining multiple excel files into one, you may use Workbook.Combine() method, see the example below:

Aspose.Cells.Workbook wkbkAspose = new Aspose.Cells.Workbook();

Aspose.Cells.Workbook wkbkMerge = new Aspose.Cells.Workbook();

wkbkAspose.Open("f:\\test\\Aspose_Test\\Aspose_Test_Blank.xls");

wkbkMerge.Open("f:\\test\\Aspose_Test\\Aspose_Test_Merge.xls");

wkbkAspose.Combine(wkbkMerge);

wkbkAspose.Save("f:\\test\\Aspose_Test\\2Aspose_Test_Tgt321.xls");

Alternatively you may copy worksheets in a workbook to other workbook for your need, see the document: http://www.aspose.com/documentation/file-format-components/aspose.cells-for-.net-and-java/copying-and-moving-worksheets.html

And, for pricing and license inquires, kindly post your queries @: http://www.aspose.com/community/forums/aspose.purchase/220/showforum.aspx

Kindly let us know if you still need some clarifications or help, we will be glad helping you.

Thank you.

Thank you for the previous details.

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.

Hi,

Thanks for giving details.

Well, that is how MS Excel generally behaves, MS Excel will change the image automatically when we change / set the contents of the embedded file.

Thank you.

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:-

How can i place a word file content in to an excel file

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?

Please can you help.

Hi,

JulieB:
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 have tested with the latest version: http://www.aspose.com/community/files/51/file-format-components/aspose.cells-for-.net-and-java/entry195573.aspx it works, you need to use the line in your code while implementing the excel files as embedded objects:
sheet.OleObjects(0).FileType = OleFileType.Xls

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.

Thank you.

I have tested setting:-

sheet.OleObjects(0).FileType = OleFileType.Xls

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”?

Thanks for your help.



Hi,

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.

Thank you.

JulieB:

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.

Hi jitendra,


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:
https://docs.aspose.com/display/cellsnet/Developer+Guide

Let us know if you still have any query or issue.

Thank you.