Help / WLanguage / WLanguage functions / Standard functions / XLS file functions
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Stored procedures
The following functions are used to manage XLS files (prefix syntax):
<xlsDocument variable>.AddWorksheetAdds or inserts a new worksheet into an Excel document.
<xlsDocument variable>.CloseCloses an XLS file.
<xlsDocument variable>.DeleteWorksheetDeletes a worksheet from the Excel document.
<xlsDocument variable>.GetMergeDetermines if a cell is merged with other cells and gets the merged cell range.
<xlsDocument variable>.MergeCellMerges the specified cells in an Excel document.
<xlsDocument variable>.RecalculateAllRecalculates all formulas in an Excel (XLSX) document.
<xlsDocument variable>.SaveSaves an XLS document.
<xlsDocument variable>.UnmergeCellUnmerges a given cell.
Related Examples:
The Excel functions Unit examples (WINDEV): The Excel functions
[ + ] Using the functions for importing/exporting a WINDEV table to/from Excel and Word. This is automatically performed by the WLanguage functions.
The following topics are presented in this example:
1/ How to export the content of a table to Excel or Word
2/ How to import the content of an Excel file to a WINDEV table
A button is used to import the entire data from a Excel file into an application table.
A second button is used to export the table content to the source Excel file in order to apply the modifications.
The table can also be exported in table format into Word.
XLS Type Unit examples (WINDEV): XLS Type
[ + ] Handling the xlsDocument, xlsColumn, xlsRow and xlsCell variables.
The purpose of this example is to explain how these types of variables can be easily handled.
WD Controlling Excel Training (WINDEV): WD Controlling Excel
[ + ] This example explains how to control Excel via OLE Automation.
All the features included in Excel can be emulated.

This example requires Excel 97 or later.

Summary of the example supplied with WINDEV:
Controlling a spreadsheet as Excel may be useful to allow the user to keep his own habits from the software powered by WINDEV.
This process is very easy via the "CExcel" class supplied with WINDEV.
The main features of Excel can be directly called (chart, inserting objects, sorts, ...).
How do I control Excel via OLE Automation?
An OLE Automation contains methods and properties. This allows you to emulate it directly in WLanguage.
For example, to display the selected cell in bold:
MyOLEAutomationObject>>Selection>>Font>>Bold = True
WD Controlling Spreadsheets Training (WINDEV): WD Controlling Spreadsheets
[ + ] This example explains how to control OpenOffice Calc and Excel with a generic code.
It gives you the ability to create, open and handle the workbooks opened in OpenOfficeCalc and Excel from a WINDEV application.
You can position on a worksheet, select cells, read and modify their content, save the workbook and close it.
The use of an abstract class (CSpreadsheet) enables you to implement a unique code, regardless of the spreadsheet installed on the user computer
Minimum version required
  • Version 24
This page is also available for…
Click [Add] to post a comment

Last update: 05/27/2024

Send a report | Local help