Save filtered rows as web page, efficiently

C

Chris Beall

Single-sheet inventory, one item per row.

From this inventory, I want to save a subset as a web page. The subset
is selected by filtering on data in one column of the sheet. There are
multiple such subsets.

Issue 1:
I can select only the filtered rows with Edit -> GoTo -> Special ->
Visible cells only, but if I then Save as Web Page, the entire sheet is
saved in HTML, with the rows that were not selected still present in the
HTML, but hidden via CSS. This makes the HTML much, much larger than is
needed to display the selected rows.

Current workaround:
Edit -> Copy the selected data, then open a template.xls with the
correct column widths, paste the data in, then Save as Web Page. Repeat
for each of 12 or so subsets.

Automation attempt:
Tried to get a macro to do the above, but could not determine how to
select the end of the filtered data. (there is data, selection criteria,
outside the range of the actual inventory items; this should not be
included in the HTML). Part of the difficulty is that relative cell
selection inside the macro works against the entire spreadsheet, not
just the visible rows, thus I couldn't select a dummy "End" cell and
step up one (visible) row in a data-independent manner.

Issue 2:
Save as Web Page includes reams of extraneous HTML and CSS not
required to present the spreadsheet data in a browser, but needed only
for two-way transition back to Excel or other MS products. MS provides
a tool for removing some of this data, but it reduced file size by less
than 1%.

Current workaround:
Using WordPad, I manually search and replace unnecessary HTML and
CSS, thus reducing HTML file size by about 30%.

Automation attempt:
None. I seem to have VB installed as a side effect of having Excel,
but don't know if it could be used to drive WordPad.

Pointers or suggestions?

Chris Beall
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top