Free Support Forum - aspose.com

Is QueryTable supported?

Excel has the ability to import HTML segments, namely stuff between table tags. To achieve this via automation, a QueryTable is used. My code is at the end of the post. Does Aspose.Excel support query tables? I got the go ahead to purchase a full licence, but without the ability to use QueryTables, we cannot use it.

Many thanks,

Steve.

using ( FileStream fs = File.OpenWrite( tempPath ) )
{
byte[] b = System.Text.Encoding.ASCII.GetBytes( all ) ;
fs.Write( b, 0, b.Length ) ;
}

Uri u = new Uri( tempPath ) ;

MsExcel.QueryTable qt = _activeWorksheet.QueryTables.Add(
string.Format(@“FINDER;{0}”,u.ToString( ) ) ,
range,
Missing.Value ) ;
qt.Name = “htm”;
qt.FieldNames = true;
qt.RowNumbers = false;
qt.FillAdjacentFormulas = false;
qt.PreserveFormatting = true;
qt.RefreshOnFileOpen = false;
qt.BackgroundQuery = true;
qt.RefreshStyle = MsExcel.XlCellInsertionMode.xlOverwriteCells;
qt.SavePassword = false;
qt.SaveData = true;
qt.AdjustColumnWidth = true;
qt.RefreshPeriod = 0;
qt.WebSelectionType = MsExcel.XlWebSelectionType.xlAllTables;
qt.WebFormatting = MsExcel.XlWebFormatting.xlWebFormattingAll;
qt.WebPreFormattedTextToColumns = true;
qt.WebConsecutiveDelimitersAsOne = true;
qt.WebSingleBlockTextImport = false;
qt.WebDisableDateRecognition = false;
qt.WebDisableRedirections = false;
qt.Refresh( false ) ;

System.IO.File.Delete( tempPath ) ;

Hi Steve,

Currently Aspose.Excel doesn’t support QueryTable. But we are thinking of importing html file. If Aspose.Excel can import a html file, will that meet your need? And what’s your expected date for this feature?

Hi Laurence,
Thanks for the reply.
If Apose.Excel can match the funcationality of Excel with regard to importing HTML (as in my samepl above), then that will indeed meet my needs. The expected date for this feature is (of course!) as soon as possible. We shall continue with Excel automation in the mean time; please could you let me know when your library supports such a feature.

Many thanks,

Steve.

Dear Steve,

Aspose.Excel will definitely support to import html. Our plan to implement this feature is:
1. Support MS SpreadsheetML (XML) format
2. Support html 4.0 via XSLT
3. Support other html format

So you can see that the whole duration for this feature is really long. It will take about several months.

Thanks for your interest on Aspose.Excel.

Hi Laurence,
I’m checking back on the progress of this feature.
If ready, I’d like to re-evaluate Aspose.Excel.

Many thanks,
Steve Dunn

Dear Steve,

We’re on the way to support HTML imports. However, as we need to have a generic solution which can support all possible HTML imports, this is a time consuming workload. I hope you can understand it.

In this case, can you assume your HTML simple enough so you can write your own html parser? This can be one of the workarounds for you. What do you think?