Jump to content

ExcelCOM Documentation


randallc
 Share

Recommended Posts

Hi,

I will transfer documentation to try to keep the UDf 1st post shorter;

please reply onnly to the other thread [link in signature]

Best, Randall

Here is the more formal attempt at a UDF with examples of usage.

===============================================================================

Description: Various functions to communicate with Excel files via com

Turns off calculation to manual, and returns to auto/ manual which was preset if "Save" requested

Can display [/ or not] as it goes, save at end or not, and exit with /or without] save

Simple; Read, Add, Write ("Into")

Complex; Write on a row (option column) a tab-delimited string (eg from text file)

Complex; Append after last row as option

Short Syntax

_XLread($sFilePath,$Sheet,$Column,$Row)

_XLwrite($sFilePath,$Sheet,$Column,$Row,$ExcelValue)

_XLwriteCol($sFilePath,$Sheet,$Column,$Row,$ExcelValue)

_XLpaste($sFilePath,$Sheet,$Column$Row,$ExcelValue,$Save)

_XLcsvPaste($sFilePath,$Sheet,$Column,$Row,$Save$csvPath,$ToColumn)

_XLadd($sFilePath,$Sheet,$Column,$Row,$ExcelValue)

_XLmacroRun($sFilePath,$Sheet,$ExcelValue)

_XLcalc($sFilePath)

_XLclose($sFilePath,$Save)

_XLexit($sFilePath) [saves changes and exit Excel] -or _XLexit($sFilePath, "Save")

_XLexit($sFilePath,$Save) [/ _XLexit($FilePath,"NOSave"); NO changes and exit Excel]

_XLlastRow($sFilePath,$Sheet)

_XLsave($sFilePath,$Sheet)

_XLshow($sFilePath,$Sheet)

_XLready($sFilePath)

_XLsort($FilePath,$Column1,$xlAscending,$Column2,$xlAscending,$SortRange)

_XLSaveAs($FilePath,$NewPath)

_XLSaveAs($FilePath,$SortedFileText,"csv")

$WorkbookPropArray=_XLSheetProps($FilePath)

_XLReadOnly($FilePath)

$XLCopyRange=_XLCopy($cFilePath,$Sheet,$NamedRange) -PAIRED WITH

_XLCopyTo($FilePath,$Sheet,$Column,$Row,$XLCopyRange)

_XLFormat($FilePath,1,"A:A",1,$DateWorld)

_XLArrayWrite($XLArray,$FilePath,1,"A1",1)

_XLArrayRead($cFilePath,1,"")

_XLCreateBlank($FilePath)

Long : _ExcelCOM($sFilePath,$Sheet,$Column,$Row,$MEExcelCom,$Save,$ExcelValue,$Visible,$Exit,$LastRow,$ToColumn)===============================================================================

_XLChart

_XLArrayRead, _ XLArrayWrite _AddGeneral

_XLSaveAs with "csv" // XLFormat // XLCreateBlank // 1_8_2

_XLArrayRead, _ XLArrayWrite _AddGeneral 1.7.8

_XLCopy, _XLCopyTo 1.7.5 Sept23rd

_XLReadOnly 1.6.9 Sept21stfunction -better, ?got it with compounds

_XLSaveAs to open template and save new name; then open that one if you want...

_XLSort EDIT Sept19th 1_4_7 - Added sort command; usage;

_XLSheetPropsSept21st **EDIT-SaveAs, ReadOnly; OK now? changed1.6.7//Sept21st 1_6_4 array already in "return"

EDIT; Attachment UDF (end of post) goes in your "include" directory; then run examples with "#include")

(SQLite needs dll registered - caution above - thanks ptrex)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...