PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Other functions linked to Excel
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
The following functions are used to manage the XLS files:
xlsAddWorksheetAdds or inserts a new worksheet into an Excel document.
xlsCloseCloses an XLS file.
xlsColumnTitleRetrieves the title of a column found in an XLS file.
xlsColumnTypeReturns the type of data entered in a column of an XLS file.
xlsCoordinatesToNameRetrieves the name of a cell, XLS worksheet or Spreadsheet control according to its coordinates.
xlsCurrentWorksheetUsed to find out and modify the current worksheet in an XLS file.
xlsDataRetrieves the content of a cell found in an XLS file.
xlsDeleteWorksheetDeletes a worksheet from the Excel document.
xlsMsgErrorReturns the caption of the last error caused by an XLS function.
xlsNameToCoordinatesReturns the coordinates of a cell, XLS file or spreadsheet control according to its name.
xlsNbColumnReturns the number of columns found in a worksheet of an XLS file.
xlsNbColumnsxlsNbColumns is kept for backward compatibility.
xlsNbRowReturns the number of rows found in an XLS file.
xlsNbRowsxlsNbRows is kept for backward compatibility.
xlsNbWorksheetReturns the number of worksheets found in an XLS file.
xlsOpenOpens an Excel file (xls or xlsx files).
xlsSaveSaves an XLS document.
xlsVersionReturns the Excel version that was used to save the file.
Other functions linked to Excel
Versions 21 and later
AAFDisable
New in version 21
AAFDisable
AAFDisable / DisableAAF
Disables the export of content of Table control or the export of selection performed in the Table control to Excel or to OpenOffice Calc (depending on the software installed on the user computer).
Versions 21 and later
AAFExecute
New in version 21
AAFExecute
AAFExecute / ExecuteAAF
Exports the content of Table control or the selection performed in the Table control to Excel or to OpenOffice Calc (depending on the software installed in the user computer).
HImportXLSImports an XLS file into a data file in HFSQL Classic or Client/Server format (data file described in the data model editor or declared by HDeclare, HDeclareExternal or HDescribeFile).
LooperToExcelCreates an Excel file from the data found in a Looper control (browsing looper or memory looper).
TableToExcelCreates an Excel file from the data found in a Table control (treeview table, browsing table or memory table).
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 required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment