This project is read-only.

VB question

Feb 12, 2011 at 2:18 PM
Edited Feb 12, 2011 at 2:22 PM

Hi, everyone,

I'm trying to use ExtremeML (and to avoid kilometers of code using DocumentFormat.OpenXML) in  ASP.NET application written in VB. Here's the piece of code:


Dim eml As ExtremeML.Packaging.SpreadsheetDocumentWrapper = ExtremeML.Packaging.SpreadsheetDocumentWrapper .Open(strFileLocation)

Dim tbl As ExtremeML.Spreadsheet. TableWrapper



I've checked everything, code is perfectly working (document is opened, var tbl gets that table part) except the last line. There is no error, just the data from datatable could not be written into Excel file. I've tried numerous ways, what I see as a general problem that I could read data from spreadsheet document but in no ways I could write to it.

I've tried C# code, it works great but unofortunately, I need to stick with VB.

If you have any suggestion, please, post it. Thanks in advance!







Feb 12, 2011 at 3:21 PM

This is such a simple scenario, I can't imagine why it wouldn't work. However, it's been a very long time since I used VB.NET, so I am not the best person to advise.

Have you tried running your C# code through one of the online converters, like ...

Maybe someone else here has a better idea?

Good luck,


Feb 13, 2011 at 9:37 AM
Edited Feb 13, 2011 at 9:39 AM

You were right, converter did the job:

Using eml = SpreadsheetDocumentWrapper.Open(strFileLocation)

Dim tbl=eml.WorkbookPart.GetTablePart("Listing").Table  



End Using 


 Although it's kind of weird, because it's pretty much the same code. Anyway, thank you very much for your suggestion!







Feb 28, 2011 at 5:33 PM

Well actually, in the original code you are getting the table from the Sheet, while in the sample and the converted code you use GetTablePart from the base DocumentWrapper.

Not sure if that was the problem.