I am using a licensed version of Cells V4.3.0.12. It has been working well for creating output reports but now I need to read in an xl file instead of using the present MS Jet method. The problem is that when I call Workbook.Open(), Aspose reads in all worksheets when I only want one of them. This causes the operation to take twice as long as with the Jet method which is a real problem.
Is there a way to only load a single worksheet rather than all?
My version does not seem to have the documented Workbook.LoadData() method. Has that gone away? Would it help me?
Thanks,
Chris
Hi,
We do not remove Workbook.LoadData() method. If you could not use Workbook.LoadData() with V4.3.0.12, please try attached fix.
Workbook.LoadData() method will load all worksheets too. This method only loads data and format, it will save memory and loading time.
We will look into how to only load a worksheet.
I can’t use the attached file because apparently our free upgrades timed out in April. We are considering buying the suite soon but haven’t finalized the decision.
I think that ability to load a single worksheet is a Very Important Feature.
Chris
Hi Aspose. We have a memory issue with a large workbook we are opening. Aspose takes over 800MB of memory to open up the workbook. Given that .net memory space is only 2gb and really only 1.2GB due to fragmentation, this kills our app and makes it run out of memory. We really only care about a worksheet at a time. If I create a workbook with just one of the worksheets, aspose only takes up 150MB of memory instead of 800MB. It would significantly help us to have the requested feature above which is to open a single worksheet in a workbook (assuming that that would be possible without having to initially use the memory to read in the entire thing). There were no responses to this post -- any word on this feature?
Also, I searched your forum and found some reference to some class called LightCells that was available in Java. I'm not sure if this is a good solution or not (we are reading a lot of data, just from a single worksheet) -- will this be signficantly slower? Will it solve the memory issue we are dealing with? Is it available in .NET yet (we are using .net and it's not in the aspose .dll we have now at least). Thanks for your help.
We can provide a method to load data in a single worksheet at a time. However, there will be some limitations:
1. If you save it again, all other worksheet's data will be lost.
2. All formulae in this worksheet won't be read. We only provide the result of these formulae.
Will it serve your need?
This will DEFINITELY help a lot if you provide this. I understand how saving would not work if you haven’t loaded all the data. Will your solution avoid the memory usage of loading all the worksheets? Thanks for your fast response.
Sure it will save memory without loading other worksheets’ data. We will provide a new version soon.
OK, I look forward to this new version. Any idea as to the timeline on this? Thanks again for your speedy responses.
We will implement it within 1-2 weeks. Will it serve your need?
yes, although we will have to push our release some to get this in. Please let us know as soon as this is in. Thanks again for your help.
Please try the attached version.
We have supported to load only some specific Worksheets from the template file. See the following codes:
Workbook workbook = new Workbook();
LoadDataOption dataOption = new LoadDataOption();
dataOption.SheetNames = new string[] {"Sheet1" };
workbook.LoadData("Book1.xls", dataOption);
Thank you.
Hi. I have been trying to test with the new .dll but I'm confused. If I create a workbook with 3 worksheets manually and try to load one of the three worksheets with Aspose,
workbook.Worksheets.Count
returns 3 and I can iterate over Worksheets and get all 3 sheets back. I think the other sheets exist but are blank? Is this the correct behavior? This actually does behave a little better for my app because I can determine the name of worksheets and know whether they exist without loading all the data, but it seems coutnerintuitive that you end up with a workbook with all the sheets but the ones you didn't explicitly say to load are blank. I just want to confirm that this is the design so I can code to it. Thanks a lot.
A more serious problem: this doesn't work with Excel 2007 (.xlsx) files. The loaddata call gives me the error:
"This file's format is not supported or you don't specify a correct format."
I don't see a way to specify a format for loaddata. Can this be fixed? Also, please let me know about whether the previous behavior I noted about opening up all other worksheets but them being blank will be the supported behavior for the future (again, it works for me, I just need to know whether to code against that or not). Thanks.
Hi,
Thanks for your inquiries.
Well, we will create all worksheets actually and only load data from the specified worksheets you specify when we call load data from the file with the load option.
And, we do not support loading data from Excel 2007 file in this method (LoadData()).We have many other features (on hand) about Excel 2007 to be supported. I 'm afraid we could not support this feature soon.
Thanks for your understanding.
Thanks for your response. Given that we already support workbook.open() and Excel 2007, we can’t stop supporting it. This feature is now totally useless to us. I really don’t understand why one method would support Excel 2007 and the other wouldn’t. I also don’t understand why you wouldn’t have told us this upfront in your message. This seems like a pretty important detail to omit, especially given that you even provided a list of drawbacks. We wasted a whole day and delayed our build trying to get this feature in, only to find out that it is now useless. This is pretty frustrating. Thank you.
Sorry for not mentioning that LoadData method doesn't support Excel2007 now. We will update the docs soon.
Few users use LoadData method now so we haven't implemented Excel2007 support now. We are working on some other important Excel2007 features. Anyway, we will support Excel2007 in LoadData method.
Hopefully we will make it in the mid of March, will it serve your need?
Thanks for your response. Although we had to go ahead with our release with the current memory limitations, it will definitely help us to get this in mid-march because we can potentially patch this back for customers who cannot use the system due to memory limitations. Please let us know when this is in. Thanks again for your help.
The issues you have found earlier (filed as 7450) have been fixed in this update.
This message was posted using Notification2Forum from Downloads module by Laurence.