How to Convert Excel Content to HTML Using Template Formatting in WPS Office Spreadsheets
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.
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.
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.
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.
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.
Click Save to create the .html file. Then open the file in a browser or code editor to inspect the generated table markup.
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.
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.
Copy Spreadsheet Content into an Existing HTML Template Manually
Use this method when you already have an HTML template and only need to insert the table data without exporting a full spreadsheet HTML file.
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. Open the workbook: Launch WPS Office Spreadsheets and open the Excel workbook or .xlsx file you want to convert.
- 2. Select the content: Select the specific cells or range to export. If nothing is selected, the current sheet is used.
- 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. 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. Preview in browser: Save the changes and open the HTML file in Safari, Chrome, or another browser to confirm it uses your template styling.

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.




