Jump to content

Search the Community

Showing results for tags 'excel writing row range'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 1 result

  1. I'm trying to append a row of data to an Excel file. I have: ;values for debug $flowfinalflow = 999.99 $flowfinalpress = 888.88 $flowcode = "FF" $crackfinalpress = 777.77 $crackfinalflow = 666.66 $crackcode = "CC" $leakfinalflow = 555.55 $leakfinalpress = 444.44 $leakcode = "LL" $partnum = "TEST00123456S" ;end of debug values $time = _Now() If $flowcode = "AC" And $crackcode = "AC" And $leakcode = "AC" Then $passfail = "PASS" Else $passfail = "FAIL" EndIf $logstring = "FLOW:" & @CRLF & "Flow: " & $flowfinalflow & @CRLF & "Pressure: " & $flowfinalpress & @CRLF & "Result: " & $flowcode & @CRLF & @CRLF & _ "CRACK:" & @CRLF & "Pressure: " & $crackfinalpress & @CRLF & "Flow: " & $crackfinalflow & @CRLF & "Result: " & $crackcode & @CRLF & @CRLF & _ "LEAK:" & @CRLF & "Flow: " & $leakfinalflow & @CRLF & "Pressure: " & $leakfinalpress & @CRLF & "Result: " & $leakcode & @CRLF & @CRLF & _ "TIME :" & $time SplashTextOn("Data Logging", $logstring, 250, 350, @DesktopWidth - 1030, 20, $DLG_TEXTLEFT) local $dataline[] = [$time, $partnum, $flowfinalflow, $flowfinalpress, $flowcode, $crackfinalpress, $crackfinalflow, $crackcode, $leakfinalflow, $leakfinalpress, $leakcode, $passfail] ;_ArrayDisplay($dataline) $oExcel = _Excel_Open(0, 0, 0, 0) $oWorkbook = _Excel_BookOpen($oExcel, "p:\alicat\A58_Datalog.xls") $nextrow = $oWorkbook.ActiveSheet.UsedRange.Rows.Count + 1 _Excel_RangeWrite($oWorkbook, Default, $dataline, "A" & $nextrow) ConsoleWrite(@error) _Excel_BookSave($oWorkbook) _Excel_BookClose($oWorkbook) _Excel_Close($oExcel) ;Sleep(4000) SplashOff() The problem is that the values get written down the A column; what I want is for the values to be written to columns A-L of the appropriate line. I tried changing the write line to: _Excel_RangeWrite($oWorkbook, Default, $dataline, "A" & $nextrow & ":L" & $nextrow) But then I get the first value of the array ($time) written to each cell of the line. What am I doing wrong?
×
×
  • Create New...