Jump to content

To Locodarwin or to Excel COM UDF experts


Recommended Posts

Thank you ! for latest . I am keep going with Excel com UDF . The following functions are not working for me correctly !

I am wondering if you show examples just by substituting the variables ?? thanks !

;_ExcelWriteFormula($oExcel, $iRow, $iColumn, $sFormula)

;_ExcelWriteArray($oExcel, $iStartRow, $iStartColumn, $aArray, $iDirection = 0, $iIndexBase = 0)

;_ExcelCopy($oExcel, $sRangeOrRowStart, $iColStart, $iRowEnd, $iColEnd)

;_ExcelColumnDelete($oExcel, $iColumn, $iNumCols)

;_ExcelNumberFormatR1C1($oExcel, $sRangeOrRowStart, $iColStart, $iRowEnd, $iColEnd, $sFormat)

;_ExcelPictureInsert($oExcel, $sFilePath, $iLeft, $iTop, $iWidth, $iHeight, $fLinkToFile = False, $fSaveWithDoc = False)

;_ExcelPictureAdjust($oPicture, $iHorizontal, $iVertical, $iRotation = 0)

;_ExcelPictureScale($oPicture, $nScaleWidth = 1, $nScaleHeight = 1, $iScaleOrigWidth = True, $iScaleOrigHeight = True, $iScaleFrom = 0)

;_ExcelHyperlinkInsert($oExcel, $sLinkText, $sAddress, $sRangeOrRow, $iColumn = 1)

;_ExcelSortExtended($oExcel, $sKey, $sRangeOrRowStart, $iColStart = 1, $iRowEnd = 1, $iColEnd = 1,

;_ExcelSort($oExcel, $sKey, $sRangeOrRowStart, $iColStart = 1, $iRowEnd = 1, $iColEnd = 1

Link to comment
Share on other sites

I would be happy to give you examples, but I must ask two things of you first.

1. Have you had the opportunity to examine the function headers (comments) for the functions you have asked about? Each of these functions includes a comment header in the ExcelCOM_UDF.au3 file that explain their syntax. It was my hope that, while waiting for my admittedly sporadic updates, users of the function collection would glean what they need from these headers.

2. Provide for me an idea of what you hope to build with the collection, so that I might provide examples that are more particular to your cause.

Also know that the chances are high that any examples I provide you will be reused in some form as examples included with the collection.

-S

(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
Link to comment
Share on other sites

  • 4 weeks later...

I would be happy to give you examples, but I must ask two things of you first.

1. Have you had the opportunity to examine the function headers (comments) for the functions you have asked about? Each of these functions includes a comment header in the ExcelCOM_UDF.au3 file that explain their syntax. It was my hope that, while waiting for my admittedly sporadic updates, users of the function collection would glean what they need from these headers.

2. Provide for me an idea of what you hope to build with the collection, so that I might provide examples that are more particular to your cause.

Also know that the chances are high that any examples I provide you will be reused in some form as examples included with the collection.

-S

Hello!

Sorry to intrude, but I'm having a problem with "_ExcelSheetUsedRangeGet". I reviewed the function comments and thought I was using it correctly, but... Here is the code that I'm using is below. I keep getting "0" returned for the last row number and I'm positive that there are 15 rows in the sheet. I apperciate any help I can get with this.

Thanks & have a great,

PJ

Local $oExcel = _ExcelBookOpen($Get_In_Fyle, 1)

Dim $Num_Rows[4]

$CurrRow = 1

$Record_Cnt = 0

$Num_Rows = _ExcelSheetUsedRangeGet($oExcel, 1)

SplashTextOn("DeBug","Last Cell Used " & $Num_Rows[0] & @CRLF & "Last Cell Used " & $Num_Rows[1] & @CRLF & "Last Col Used " & $Num_Rows[2] & @CRLF & "Number of rows = " & $Num_Rows[3], 500, 200, -1, 50, 4, "", 12)

Sleep(300)

MsgBox(4096,"DeBug", "Number of rows = " & $Num_Rows[3])

; MsgBox(4096,"DeBug", "Control Number = " & $Ctrl_No)

For $Cell = 1 to $Num_Rows[3]

$Ctrl_No = _ExcelReadCell($oExcel, $Cell, 1)

MsgBox(4096,"DeBug", "Control # = " & $Ctrl_No & @CRLF & "Cell # = " & $Cell& @CRLF & "Number of rows = " & $Num_Rows[3])

FileWriteLine($Insert_Fyle,"Insert into Reset_Tmp_CNUM (C_Num) values ('" & $Ctrl_No & "')" & @CRLF)

$Record_Cnt = $Record_Cnt + 1

Next

; And finally we close out

_ExcelBookClose($oExcel)

FileClose($Insert_Fyle)

MsgBox(4096,"Insert Create", "Insert file created -- " & $Record_Cnt & " records written!")

Link to comment
Share on other sites

I just uploaded the bug fix for _ExcelSheetUsedRangeGet() to the original post. Click on the link in my signature and grab v1.32 of the UDF. That should solve the problem you described above.

-S

(Yet Another) ExcelCOM UDF"A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly...[indent]...specialization is for insects." - R. A. Heinlein[/indent]
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...