No need for MsExcel, LibreOffice or OpenOffice
In addition to copytoxlsx, has some formatting capabilities.
Export the data displayed in a grid, or the data contained by a table / cursor
Properties:
a) To export the data displayed in a grid (only the visible columns)
Drop an instance of the exportxlsx class to your form and set :
- grid=grid reference
- label (optional)=the default file name; a reference to an object with the "caption" property; by default DATETIME()
b) To export the data contained in a table / cursor
Drop an instance of the exportxlsx class to your form and set :
- grid=table / cursor name
- label (optional)=the default file name; a reference an object with the "caption" property; by default DATETIME()
- cFields (optional)= list of fields to be displayed, separated by commas; by default all the fields are exported
- cHeaders (optional)= list of field headers to be displayed, separated by commas; by default the field names
c) Formatting properties (at right click)
headbackcolor=back color for column headers (if >=0)
headfontbold= .T./.F.
headfontitalic= .T./.F.
headfontname=if not empty and installed
headfontsize=if>0
headforecolor=font color for column headers (if >=0)
rowbackcolor=back color for rows (if >=0)
rowfontbold= .T./.F.
rowfontitalic= .T./.F.
rowfontname=if not empty and installed
rowfontsize=if>0
rowforecolor=font color for rows (if >=0)
d) Miscelaneous
a) SheetName
character (default sheet1)
public
desired sheetname
b) sheetFirstCol
character (default A)
public
start column
c) sheetFirstRow
numeric (default 1)
public
start row
d) lastcol
character (XFD)
public
last valid column (maximum column / sheet)
e) lastrow
numeric (1048576)
public
last valid row (maximum number of rows / sheet)
f) autocolw
logical (default .F.)
public
.T. columns width are evaluated based on font size and the data type (the autosize feature)
f) lMemoAsComment
logical (default .F.)
public
When is .T., memo fields are converted into comments while the cell contains the word "Memo"
support for more than 702 columns
stop the export after the row 1048576 and the column XFD
rows height depend on the font size
when memo columns are present, the row height depends on the number of CR (increase the row height according to the number of memo rows)
Export To Xlsx 1.8 (class)
Related posts
http://praisachion.blogspot.com/2016/06/inspectpptx-10.html
http://praisachion.blogspot.com/2016/06/inspectdocx-10.html
MSOffice -> DBF
http://praisachion.blogspot.com/2017/08/importfromxlsx-40.html
http://praisachion.blogspot.com/2017/06/append-from-xlsx-30.html
http://praisachion.blogspot.com/2016/08/importfromxlsx-34.html
http://praisachion.blogspot.com/2016/08/importfromxlsx-33.html
http://praisachion.blogspot.com/2016/06/importfromxlsx-32-appendfromxlsx-21.html
http://praisachion.blogspot.com/2016/06/appendfrompptx-10.html
http://praisachion.blogspot.com/2016/06/appendfromdocx-21.html
http://praisachion.blogspot.com/2016/06/importfromdocx-31.html
http://praisachion.blogspot.com/2016/06/importfrompptx-11.html
http://praisachion.blogspot.com/2016/06/importfromxlsx-31.html
http://praisachion.blogspot.com/2016/06/importfrompptx-10.html
http://praisachion.blogspot.com/2016/06/importfromdocx-30.html
http://praisachion.blogspot.com/2016/05/importfromxlsx-22.html
http://praisachion.blogspot.com/2016/02/import-dbf-from-msoffice-2007-xlsx-docx.html
http://praisachion.blogspot.com/2016/01/importfromdocx-20.html
http://praisachion.blogspot.com/2016/01/appendfromdocx-20.html
http://praisachion.blogspot.com/2016/01/importfromxlsx-13.html
http://praisachion.blogspot.com/2016/01/appendfromxlsx-20.html
http://praisachion.blogspot.com/2015/12/appendfromxlsx-15.html
http://praisachion.blogspot.com/2015/11/importfromxlsx-13.html
http://praisachion.blogspot.com/2015/09/importfromxlsx-12.html
http://praisachion.blogspot.com/2015/09/appendfromxlsx-14.html
http://praisachion.blogspot.com/2015/09/appendfromnxlsx-13.html
http://praisachion.blogspot.com/2015/08/importfromxlsx-11.html
http://praisachion.blogspot.com/2015/07/import-from-xlsx.html
http://praisachion.blogspot.com/2015/07/insert-from-focx.html
http://praisachion.blogspot.com/2015/06/append-from-docx.html
DBF -> MSOffice
Dbf2Xlsx6 4.2 (VFP6)
http://praisachion.blogspot.com/2017/04/export-dbf-to-excel-2007.html
http://praisachion.blogspot.com/2017/01/export-dbf-to-msexcel-xlsx.html
http://praisachion.blogspot.com/2017/01/export-dbf-to-mspowerpoin-pptx.html
http://praisachion.blogspot.com/2017/01/export-dbf-to-msword-docx.html
http://praisachion.blogspot.com/2016/11/export-to-xlsx.html
http://praisachion.blogspot.com/2016/11/export-to-pptx.html
http://praisachion.blogspot.com/2016/11/export-to-docx.html
http://praisachion.blogspot.com/2016/11/export-from-vfp6-to-msoffice-docx-pptx.html
http://praisachion.blogspot.com/2016/09/copytoxlsx6-10.html
http://praisachion.blogspot.com/2016/01/export-dbf-to-msoffice-2007-xlsx-docx_24.html
http://praisachion.blogspot.com/2016/01/export-dbf-to-msoffice-2007-xlsx-docx.html
http://praisachion.blogspot.com/2016/01/exporttopptx-20.html
http://praisachion.blogspot.com/2016/01/exporttodocx-20.html
http://praisachion.blogspot.com/2016/01/copytopptx-20.html
http://praisachion.blogspot.com/2016/01/exporttoxlsx-20.html
http://praisachion.blogspot.com/2016/01/copytoxlsx-30.html
http://praisachion.blogspot.com/2015/12/exporttoxlsx-19-class.html
http://praisachion.blogspot.com/2015/12/copytoxlsx-210-procedure.html
http://praisachion.blogspot.com/2015/12/exporttoxlsx-18-class.html
http://praisachion.blogspot.com/2015/12/copytoxlsx-29.html
http://praisachion.blogspot.com/2015/02/export-pptx-13.html
http://praisachion.blogspot.com/2015/01/copytodocx-12.html
http://praisachion.blogspot.com/2015/01/exportdocx-1.html
OOffice -> DBF
http://praisachion.blogspot.com/2016/11/import-from-openoffice-libreoffice-for.html
http://praisachion.blogspot.com/2016/09/importfromoowrtext-10.html
http://praisachion.blogspot.com/2016/09/importfromooffice-1o.html
http://praisachion.blogspot.com/2016/08/importfromoocalc.html
DBF -> OOffice
http://praisachion.blogspot.com/2016/09/export-dbf-to-openoffice-libreoffice_52.html
http://praisachion.blogspot.com/2016/09/export-dbf-to-openoffice-libreoffice_16.html
http://praisachion.blogspot.com/2016/09/copy-to-ods-10-openoffice-calc.html
http://praisachion.blogspot.com/2016/09/export-dbf-to-openoffice-libreoffice.html
http://praisachion.blogspot.com/2016/09/copy-to-odt-10.html
Faceți căutări pe acest blog
Se afișează postările cu eticheta grid. Afișați toate postările
Se afișează postările cu eticheta grid. Afișați toate postările
joi, 3 decembrie 2015
miercuri, 19 august 2015
Changing the color of grid's HighlightRowLine
The selected row of a Grid is emphasized with a border around it.
The thickness can be controlled with the grid's HighlightRowLineWidth property.
But there is no HighlightRowLineColor property, and this color is given by the OS's "Selected Items" color.
In Windows 7 can be accessed this way :
Control Panel -> Personalization -> Window Color -> Selected Items (chosen from the combobox)
In Windows 10, I haven't found yet where it can be (I suppose lies in some registry key).
But a small VFP code can help you :
************
* Begin Code
************
Declare integer SetSysColors in user32 integer, string, string
lnNewColor = 255
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnNewColor,'4RS')) && 1 means a single color would be changed; 13 is the numeric code for Selected Item
************
* End Code
************
Here is a more complete code
************
* Begin Code
************
Declare integer GetSysColor in user32 integer
Declare integer SetSysColors in user32 integer, string, string
LOCAL lnNewColor,lnOldColor
lnOldColor = GetSysColor(13) && store the old color
lnNewColor = 255
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnNewColor,'4RS')) && set new color
DO FORM MyFormContainingTheGrid && verify the grid
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnOldColor,'4RS')) && restore the old color
************
* End Code
************
GetSysColor
SetSysColor
Another VFP example for GetSysColor and SetSysColor
The thickness can be controlled with the grid's HighlightRowLineWidth property.
But there is no HighlightRowLineColor property, and this color is given by the OS's "Selected Items" color.
In Windows 7 can be accessed this way :
Control Panel -> Personalization -> Window Color -> Selected Items (chosen from the combobox)
In Windows 10, I haven't found yet where it can be (I suppose lies in some registry key).
But a small VFP code can help you :
************
* Begin Code
************
Declare integer SetSysColors in user32 integer, string, string
lnNewColor = 255
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnNewColor,'4RS')) && 1 means a single color would be changed; 13 is the numeric code for Selected Item
************
* End Code
************
Here is a more complete code
************
* Begin Code
************
Declare integer GetSysColor in user32 integer
Declare integer SetSysColors in user32 integer, string, string
LOCAL lnNewColor,lnOldColor
lnOldColor = GetSysColor(13) && store the old color
lnNewColor = 255
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnNewColor,'4RS')) && set new color
DO FORM MyFormContainingTheGrid && verify the grid
setsyscolors(1,BINTOC(13,'4RS'),BINTOC(m.lnOldColor,'4RS')) && restore the old color
************
* End Code
************
GetSysColor
SetSysColor
Another VFP example for GetSysColor and SetSysColor
Abonați-vă la:
Postări (Atom)