Jump to content

Virgilio1

Active Members
  • Posts

    28
  • Joined

  • Last visited

Recent Profile Visitors

230 profile views

Virgilio1's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Also I have the problem with words that contain the letter z !!! Someone to any suggestions? Problem solved: Func _GetItemsArr($sSubString) Return StringRegExp($___nList, "(?sm" & $___C_Sensitive & ")\" & $___sDelimiter & "(\Q" & StringRegExpReplace($sSubString, "\\", "[\1]") & "\E[^\" & $___sDelimiter & "]+)" , 3) EndFunc
  2. Thanks a lot, great job works well. A job well deserves to be included among the UDF !!! I also wrote these other functions that go well: Func _LibXL_SheetWriteNum($hSheet, $iRow, $iCol, $Num, $hFormat = Null) Local $aRet = DllCall($__hlibXL, "int:cdecl","xlSheetWriteNumW","handle",$hSheet, "int", $iRow, "int", $iCol,"double",$Num,"handle", $hFormat) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Else Return $aRet[0] EndIf EndFunc Func _LibXL_BookLoad($hBook, $sFileName) Local $aRet = DllCall($__hLibXL,"int:cdecl","xlBookLoadW","ptr",$hBook,"wstr",$sFileName) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Else Return $aRet[0] EndIf EndFunc Func _LibXL_BookInsertSheet($hBook,$pos,$sSheetName, $hInitSheet = 0) local $aRet = DllCall($__hLibXL, "handle:cdecl","xlBookInsertSheetW","ptr",$hBook,"int",$pos,"wstr",$sSheetName, "handle", $hInitSheet) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Else Return $aRet[0] EndIf EndFunc Func _LibXL_BookGetSheet($hBook, $pos) local $aRet = DllCall($__hlibXL,"handle:cdecl","xlBookGetSheet","ptr", $hBook, "int", $pos) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Else Return $aRet[0] EndIf EndFunc While this feature is not to be: Func _LibXL_SheetSetMerge($hSheet, $rowFirst, $colFirst, $rowLast, $colLast) Local $aRet = DllCall($__hLibXL, "int:cdecl","xlSheetSetMergeW","handle", $hSheet, "int", $rowFirst, "int", $colFirst, "int", $rowLast, "int", $colLast) If @error Or Not $aRet[0] Then Return SetError(@error, @extended, 0) Else Return $aRet[0] EndIf EndFunc Thanks again
  3. Hello, after searching the net I decided to buy the site Libxl.dll (http://www.libxl.com/). Now I would first try to write a wraper in autoit. Here there is the documentation: (http://www.libxl.com/documentation.html) I tried to ascribe this short script Global $DllHandle LoadDll() $a = CreateBook() SaveBook($a, @ScriptDir & "\Prova.xlsx") Func LoadDll($dll ="") if $dll ="" Then $DllHandle = DllOpen("libxl.dll") Else $DllHandle = DllOpen($dll) EndIf if $DllHandle = -1 Then ConsoleWrite("Error Load Dll") Exit EndIf EndFunc Func CreateBook() Dim $rest = DllCall($DllHandle,"ptr*","xlCreateXMLBook") if @error Then ErrorTrace("Create") Else Return $rest[0] EndIf EndFunc Func SaveBook($book, $nome) Dim $rest = DllCall($DllHandle,"int","xlBookSave","ptr",$book,"char",$nome) if @error Then ErrorTrace("Save") EndIf EndFunc Func ErrorTrace($nome = "") ConsoleWrite("Nome " & $nome & " Error Number " & @error & @crlf) Exit EndFunc but it does not work. calls in c are: Can you give me a hand ? Thanks so much
  4. Thank you, but by studying the site I found this: but I have some .xlsx files to compile, so this dll is not my case. I am several days that I try a dll that particular case mine, but all of the dll written in C # and are not able to integrate with autoit !!! it obnoxious that in PHP, JavaScript, vb.net, etc is very simple
  5. Thanks for your help. It is a big problem. I have to write a script that creates an excel file without Office package. On the web I found several libraries An example is as follows: http://spreadsheetlight.com/download/ But the dll is compiled in c # and I do not think that you can use with autoit. Do you have any idea ?
  6. the library works, is safe. I think it's a problem of how to step Adjustment parameters to functions. this is the function that I found in the forum of Autohotkey workbook_add_worksheet(workbook, sheetname) { StrPutVar(sheetname, _sheetname, "utf-8") return DllCall("libxlsxwriter\workbook_add_worksheet" , "ptr", workbook , "ptr", (sheetname="") ? 0 : &_sheetname , "cdecl ptr") } This is the definition in the language c : lxw_worksheet* workbook_add_worksheet ( lxw_workbook * workbook, const char * sheetname ) I do not understand why it does not work ???
  7. thank you very much for your availability. Now the file is saved, but it does not have the correct structure I added this function: Func _AddWorkSheet($Work, $nome) Local $tStringUTF8 = _WinAPI_WideCharToMultiByte($nome, $CP_UTF8, False) Local $pString = DllStructGetPtr($tStringUTF8) $result = DllCall($LibXslDll,"ptr:cdecl","workbook_add_worksheet", "ptr", $Work, "ptr", $pString) If @error Then ConsoleWrite(@error) Return -1 Else Return $result[0] EndIf EndFunc but I get an error that I do not understand. Can you tell me something? Thanks again
  8. Hello everyone, I'm trying to use the libxlsxwriter.dl that lets you create an Excel file without having Excel installed on the machine. http://libxlsxwriter.github.io/index.html the website is available in the documentation dll and (This dll was found from http://www.rapideuphoria.com/libxlsxwriter.zip , it may not the latest version). in https://autohotkey.com/boards/viewtopic.php?p=128209#p128209 forum I found an example for authokey and I'm trying to fit it all for autoit. I wrote this short example: Global $LibXslDll = 0 _XslStart("libxlsxwriter.dll") $p = _OpenWorkBook("prova.xlsx") _CloseWorkBook($p) Func _XslStart($dll) $LibXslDll = DllOpen($dll) If $LibXslDll = -1 Then Return SetError(1, 0, 0) Return 1 EndFunc Func _OpenWorkBook($filename) $result = DllCall($LibXslDll,"ptr:cdecl","new_workbook", "str",$filename) if @error Then ConsoleWrite(@error) return -1 Else return $result[0] EndIf EndFunc Func _CloseWorkBook($Work) $result = DllCall($LibXslDll,"int:cdecl","workbook_close", "ptr", $Work) if @error Then ConsoleWrite(@error) EndIf EndFunc I have no errors, but the file that creates does not have the correct name and is corrupt. Can you help me? thank you
  9. EPPlus is a .net library that reads and writes Excel 2007/2010 files using the Open Office Xml format (xlsx) https://epplus.codeplex.com/. I do not have the expertise to create a UDF to use the DLL. I have to use the dllopen functions () dllcall () but I do not know how to do! can you help me, thanks. sorry my bad English
  10. Yes, but also to make the application much faster that creates files.
  11. Salve Amici, in un mio progetto vorrei utilizzare una dll per creare dei file excel senza utilizzare l'applicativo Excel. Ora dalla versione 2007 di Office la Microsoft utilizza per i file un nuovo formato aperto "Microsoft Open XML format". in PHP questo è molto semplice utilizzando la Libreria PHPExcel (http://www.codeplex.com/PHPExcel) Cercando in rete ho trovato una dll che dovrebbe fare lo stesso (https://code.google.com/archive/p/excellibrary/) ma non ho assolutamente le capacita di integrare la Dll in autoit, qualcuno mi può aiutare ? Sarebbe veramente molto efficiente poter creare e manipolare file excel in autoit senza dover caricare in memoria l'applicativo Excel. Grazie -.-.-.-.-. Hello friends, in my project I want to use a dll to create the excel file without using the Excel application. Now from the Microsoft Office 2007 version uses for the files a new open format "Microsoft Open XML format". PHP This is very simple using the Library PHPExcel (http://www.codeplex.com/PHPExcel) Searching the net I found a dll that should do the same (https://code.google.com/archive/p/excellibrary/) but I have absolutely the ability to integrate the .dll in autoit, anyone can help me? It would really be very efficient to create and manipulate Excel files into memory autoit without having to load the Excel application. Thank you
  12. my script is Local $lgtA = $CoordinatePartenza[2] Local $lgtB = $CoordinateArrivo[2] Local $url = "https://maps.googleapis.com/maps/api/distancematrix/xml?origins=" & $lgtA[0] & "+" & $lgtA[1] & "&destinations=" & $lgtB[0] & "+" & $lgtB[1] & "&mode=driving&language=it-IT&key=" & $ApiGoogleKey I have this error : ! Unknown SSL protocol error in connection to maps.googleapis.com:443 I do not understand why.
  13. Hello everyone, how do I calculate the week number (1-52) from a date? with VBasic doing so, but I can not find the corresponding function in autoit !!! Dim settimana As Integer settimana=DatePart(ww, Now()) Thanks and sorry for my bad English (thanks google translator).
  14. Thank you
  15. Thank you so much for this udf . Sorry for my bad English. I have to write a function to create a report to RTF, you can provide some information? Is there any UDF or function that creates an RTF file? Thank you.
×
×
  • Create New...