Jump to content

Raviteja

Members
  • Posts

    9
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Raviteja's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. What is the issue with 3.3.14.2?
  2. I am using Autoit 3.3.14.2 version. Excel sheet attached.
  3. Please go through the code..
  4. It is a Excel workbook. And sure it is a valid number. After your post i validated again.
  5. Hi "Water" Please check the below link The same error I am getting but when I am doing read. In that link I didn't find any ans. If u have any solution it will help me greatly.
  6. Range read and range write is ok. In my app, need to access two columns having 1500 lines(rows) at a time. So it will increase my application area. So that's why I didn't prefer range read and write. Read cell and write cell functions I taken it from an UDF and that UDF is also found in this forum itself. Function is validating the column and rows. If both are valid it is going and reading/writing the cell. For write: $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value = $sValue For read: $sValue = $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value are the lines of code in write cell and read cell functions respectively. After reading approx 3000 cells it is throwing the below error $sValue = $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn).Value $oExcel.Activesheet.Cells($sRangeOrRow, $iColumn)^ ERROR Using do while I tried to read it once again. But no luck.
  7. Hi, Thank u for the reply. First i tried to work on this project using simulated data, with which i able to open the file and copy the data. But failed in appending data. Immediately started working on the pseudo code what u given. Later i got the files on what i need to work on. Here i am facing another issue, i am unable to open the file. When i opened normally(directly with out script) it is saying the excel sheet consists unreadable characters do u want me to open. May be because of this, i am unable to open using script. Can u help me in this. Error: Fail to open "First file name in the folder" This is the script what i wrote: #include <File.au3> #include <Array.au3> #include <Excel.au3> #include <Constants.au3> #include <MsgBoxConstants.au3> ; ; AutoIt Version: 3.0 ; Language: English ; Platform: Win9x/NT ; Author: Raviteja ; ; Script Function: Local $i Local $j Local $l = 1 Local $path = "D:\AUTO_IT\Simulator\" ; Create application object Local $oExcel = _Excel_Open() If @error Then Exit MsgBox(16, "Excel UDF: _Excel_BookOpen Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) $newbook = _Excel_BookNew($oExcel, 5) Local $FileArray = _FileListToArray($path,"*.xlsm") For $i = 1 To $FileArray[0] Local $book = _Excel_BookOpen($oExcel, $path & $FileArray[$i]) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Error", "Fail to open " & $FileArray[$i], 0) For $j = 14 To 24 ; For now i made it fixed _ExcelReadCell($book, $j, 2) _ExcelWriteCell($newbook, $l, 2) $l = $l + 1 Next Next _Excel_BookSaveAs($newbook, "D:\AUTO_IT\Final_Report\Report.xlsx", $xlWorkbookDefault, True) If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Status", "Failed to save " & "Report", 0) MsgBox($MB_SYSTEMMODAL, "Status", "Saved successfully", 0) Sleep(2000) _Excel_Close ($oExcel)
  8. I have a data, in 100 files excel files. The data will be in fixed columns in those 100 files. And number of rows will be variable. I need copy all those data in to 1 excel sheet and to one column sequentially. I am able to copy any(one) file to output file. But unable to do appending one after another. Can any one help?
×
×
  • Create New...