Skip to content
Export table/cursor to XLS version 3
xBase C Batchfile
Branch: master
Clone or download
Martina Jindrová
Martina Jindrová Examples
Latest commit 8f67411 Aug 13, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc Init Jul 31, 2019
examples Examples Aug 12, 2019
src FoxyXLS::GetFontFullName() - fix bug array dimension invalid Aug 12, 2019
.gitattributes 🎊 Added .gitattributes Jul 31, 2019
.gitignore Ignore extensions Aug 6, 2019
clear.bat clear Aug 12, 2019
readme.md Init Jul 31, 2019

readme.md

FoxyXLS class (fork)

Original project: FoxyXLS

Changes

  • One code for VFP 6, 7, 8, 9.
  • Internal array limit to 65000 cells (VFP 6, 7, 8) removed.
  • Header file with constants.
  • Add support for INTEGER data type.
  • Fixed bug with cell style.
  • Fixed bug with date/datetime value.
  • Reduce cell styles.

Examples

#INCLUDE foxyxls.h
LOCAL m.lcFile, m.loExcel
m.lcPath=JUSTPATH(SYS(16))+"\"
m.lcFile = m.lcPath+"Test1.xls"


SET PROCEDURE TO "FoxyXLS.prg"
m.loExcel = CREATEOBJECT("FoxyXLS")

m.loExcel.cAuthor = "VFPIMAGING"
m.loExcel.nCodePage = 1252

m.loExcel.nDefaultRowHeight   = 30 && Points
m.loExcel.nDefaultColumnWidth = 14 && Characters

*!* m.loExcel.SetColumnWidth(3, 180)
*!* m.loExcel.SetColumnWidth(1, 180)

m.loExcel.AddCell( 1, 1, "White"    , "Segoe UI,10,B,White")
m.loExcel.AddCell( 2, 1, "Red"      , "Segoe UI,10,B,Red")
m.loExcel.AddCell( 3, 1, "Green"    , "Segoe UI,10,B,Green")
m.loExcel.AddCell( 4, 1, "Blue"     , "Segoe UI,10,B,Blue")
m.loExcel.AddCell( 5, 1, "Yellow"   , "Segoe UI,10,B,Yellow")
m.loExcel.AddCell( 6, 1, "Magenta"  , "Segoe UI,10,B,Magenta")
m.loExcel.AddCell( 7, 1, "Cyan"     , "Segoe UI,10,B,Cyan")
m.loExcel.AddCell( 8, 1, "DarkRed"  , "Segoe UI,10,B,DarkRed")
m.loExcel.AddCell( 9, 1, "DarkGreen", "Segoe UI,10,B,DarkGreen")
m.loExcel.AddCell(10, 1, "DarkBlue" , "Segoe UI,10,B,DarkBlue")
m.loExcel.AddCell(11, 1, "Olive"    , "Segoe UI,10,B,Olive")
m.loExcel.AddCell(12, 1, "Purple"   , "Segoe UI,10,B,Purple")
m.loExcel.AddCell(13, 1, "Teal"     , "Segoe UI,10,B,Teal")
m.loExcel.AddCell(14, 1, "Silver"   , "Segoe UI,10,B,Silver")
m.loExcel.AddCell(15, 1, "Gray"     , "Segoe UI,10,B,Gray")
m.loExcel.AddCell(16, 1, "Black"    , "Segoe UI,10,B,Black")
m.loExcel.AddCell(17, 1, "Automatic", "Segoe UI,10,B,Automatic")

m.loExcel.AddCell(20, 1, "Date in BRITISH format", "SEGOE UI,12,I")
m.loExcel.AddCell(20, 3, DATE(), "SEGOE UI,12,I", "dd/mm/yyyy", XLSALIGN_CENTER)

m.loExcel.AddCell(21, 1, "Date in AMERICAN format", "SEGOE UI,12,I")
m.loExcel.AddCell(21, 3, DATE(), "SEGOE UI,12,I", "m/d/yy"    , XLSALIGN_CENTER)

m.loExcel.AddCell(23, 1, "Values", "SEGOE UI,12,I")
m.loExcel.AddCell(23, 3, 1500)

m.loExcel.AddCell(24, 1, "Formatted Values")
m.loExcel.AddCell(24, 3, 1500, , "#,##0.00")

m.loExcel.AddCell(25, 1, "Currency formatted Values")
m.loExcel.AddCell(25, 3, 1500, , "$#,##0.00")
m.loExcel.AddCell(26, 3, -1500, , "$#,##0.00")

m.loExcel.AddCell(27, 1, "Percentage")
m.loExcel.AddCell(27, 3, 0.252, , "0.00%")

m.loExcel.WriteFile(m.lcFile)
You can’t perform that action at this time.