Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi2all!
I want add to active Worksheet content of 1 HTML file, which consist of paragraphs, tables and images. I use the following code to do this: public void InsertHTML() { object connection = @"URL;C:\html\test_html.html"; Range curRange = (Range)this.Application.Selection; Worksheet curSheet = (Worksheet)this.Application.ActiveSheet; QueryTable tblQuery = curSheet.QueryTables.Add(connection, curRange, missing); tblQuery.BackgroundQuery = true; tblQuery.TablesOnlyFromHTML = false; tblQuery.Refresh(false); tblQuery.SaveData = true; tblQuery.Delete(); } And I have 2 problems: 1) no images from source 'test_html.html' file is inserted into worksheet; 2) no table column width is derived from source file But when I press Ctrl+O from Excel and open this HTML file, all images and table styles import correctly! How I can get the same in my VSTO add-in? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 and inserted images | Excel Programming | |||
imported images in Excel 2007 | Excel Discussion (Misc queries) | |||
print images in excel 2007 | Excel Discussion (Misc queries) | |||
Excel replaced HTML Project but Images are lost | Excel Programming | |||
VBA code to insert images in excel sheet | Excel Programming |