Data Import & Export

How to Convert Excel Content to HTML Using Template Formatting in WPS Office Spreadsheets

John WilsonJohn Wilson Nov 13, 2026 869 views

Question details

The user wants to export spreadsheet content to an HTML file and use an HTML template's styling instead of the spreadsheet's own formatting.

Product
WPS Office Spreadsheets
Device & OS
macOS High Sierra
Scenario
The user needs to move spreadsheet content into an HTML file while preserving an existing HTML template design.
Observed behavior
The default HTML export keeps spreadsheet formatting, but the user wants the HTML template styling applied instead.
Before you start

Open the workbook in WPS Office Spreadsheets and keep your HTML template file or CSS file accessible. Decide whether you want to export the whole sheet or only a selected range before opening Save As.

Solution 1Recommended

Save a Selected Range or Workbook as HTML and Link Your Template CSS

Use this method when you need the full table structure from the spreadsheet but want the final page to use your HTML template design.

The HTML file generated by a spreadsheet application contains table markup and inline formatting. To use your HTML template styling, keep the generated table structure but remove or override the inline styles and link your template CSS file.

1
Select the content to export

In WPS Office Spreadsheets, open the workbook and select the cells or range you want to convert. If you want the entire sheet, leave the selection empty or select the full sheet.

2
Open Save As and choose Web Page format

Go to File > Save As, choose a save location, and set the file type to Web Page (*.html; *.htm). If your version shows a selection option, enable it to export only the selected range.

3
Save the HTML file

Click Save to create the .html file. Then open the file in a browser or code editor to inspect the generated table markup.

4
Apply the HTML template styling

Open the saved HTML file in a code editor, link your HTML template CSS file, and remove or override the inline spreadsheet style attributes so the page uses your template design.

5
Preview the result

Save the edited HTML file and open it in Safari, Chrome, or another browser to confirm the spreadsheet content now follows your HTML template styling.

Template styling applied: After linking the template CSS, open the HTML file in a browser to verify that the spreadsheet table uses your site styling.
WPS Spreadsheets HTML export

Convert Spreadsheet Content to an HTML Template in WPS Office

Use WPS Office Spreadsheets to export a selected range or workbook as an HTML file, then link your existing HTML template CSS so the table inherits your site styling.

  1. 1. Open the workbook: Launch WPS Office Spreadsheets and open the Excel workbook or .xlsx file you want to convert.
  2. 2. Select the content: Select the specific cells or range to export. If nothing is selected, the current sheet is used.
  3. 3. Save as Web Page: Click File > Save As, choose a save location, and set the file type to Web Page (*.html; *.htm). Enable the selection option if prompted.
  4. 4. Apply template CSS: Open the saved HTML file in a code editor, link your template CSS file, and remove or override any inline spreadsheet styles.
  5. 5. Preview in browser: Save the changes and open the HTML file in Safari, Chrome, or another browser to confirm it uses your template styling.
Export a selected range or entire workbook to standard HTML without losing table structureReuse your existing HTML/CSS template instead of Excel's inline formattingFull compatibility with Microsoft Excel .xlsx files for opening, editing, and savingFree, lightweight Office suite with a familiar spreadsheet interface
microsoft office alternative - wps office

Frequently Asked Questions

Can I export only a selected range instead of the entire sheet?

Yes. Select the range first, then go to File > Save As, choose Web Page (*.html; *.htm), and enable the Selection option if available.

Why does the exported HTML still look like Excel after I open it?

The generated file includes inline spreadsheet styles. Link your HTML template's CSS file and remove or override the inline style attributes so the page uses the template design.

Will this method work with existing .xlsx workbooks?

Yes. WPS Office Spreadsheets can open Microsoft Excel .xlsx files and save them as .html while preserving the table structure.

How can I view the HTML source code after exporting?

Open the .html file in a browser or code editor. In a browser, use the View Source command to see and copy the generated table markup.