Jump to content

Search the Community

Showing results for tags 'line break'.

  • 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

Categories

  • Forum FAQ
  • AutoIt

Calendars

  • Community Calendar

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 3 results

  1. I'm trying to write data from array into .text file with line break and i did it successfully. but now I want to write from the same array into already empty excel with with line breaks means each value of array should be written in next cell automatically as it's happening in text file using "Filewrite" Looking for guidance. Here is my code; $file = fileopen(@scriptdir & "\source.txt", 10) $IE = _IECreate("http://www.example.com") $source = _IEDocReadHTML($IE) FileWrite($file, $source) $target_source1 = _StringBetween($source, '<span>', '</span>') If Not @error Then For $i=0 To UBound($target_source1) -1 FileWrite (@scriptdir & "\save.txt", $target_source2[$i] & @crlf) ; I want to write above array onto excel file Next EndIf
  2. Hi, im writing from an array to an excel sheet and want to use line breaks. The following piece of code does not do this job (instead of the line break the "[...]chr(10)[...]" is displayed in the cell: #include <Array.au3> #include <Excel.au3> #include <MsgBoxConstants.au3> ; Create application object and create a new workbook Local $oAppl = _Excel_Open() If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example", "Error creating the Excel application object." & @CRLF & "@error = " & @error & ", @extended = " & @extended) Local $oWorkbook = _Excel_BookNew($oAppl) If @error Then MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example", "Error creating the new workbook." & @CRLF & "@error = " & @error & ", @extended = " & @extended) _Excel_Close($oAppl) Exit EndIf ; ***************************************************************************** ; Write a 1D array to the active sheet in the active workbook ; ***************************************************************************** Local $aArray1D[3] = ['"Zeile 1 " & vbLf & " Zeile 2"', 'B', 'CC'] _Excel_RangeWrite($oWorkbook, $oWorkbook.Activesheet, $aArray1D, "A3") If @error Then Exit MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example 2", "Error writing to worksheet." & @CRLF & "@error = " & @error & ", @extended = " & @extended) MsgBox($MB_SYSTEMMODAL, "Excel UDF: _Excel_RangeWrite Example 2", "1D array successfully written.") What am i doing wrong? Any help is appreciated. Best regards Daniel
  3. Im trying to edit a file, I want to find a string which has a line break in it, and replace it with a string that has multiple line breaks in it. editfile.txt looks like this: dog cat mouse chicken my au3 script looks like this but is not working, i suspect because of how I am trying to do the line breaks? Func EditFile($CurrentFile) $szFile = "$CurrentFile" $szText = FileRead($szFile,FileGetSize($szFile)) $szText = StringReplace($szText, "Cat" & @CRLF & "Dog", "Hippo" & @CRLF "Lion" & @CRLF & "Tiger") FileDelete($szFile) FileWrite($szFile,$szText) EndFunc ;--EditFile-- But once ran the file should look like this: Hippo Lion Tiger cat mouse chicken I cannot replace by line number as the animals are not in the same line in each copy of the file i want to run against. Can anyone help?
×
×
  • Create New...