Skip to content

Instantly share code, notes, and snippets.

@labeneator
Last active July 19, 2019 11:57
Show Gist options
  • Save labeneator/7a7e95df84910f397289c54ad259a160 to your computer and use it in GitHub Desktop.
Save labeneator/7a7e95df84910f397289c54ad259a160 to your computer and use it in GitHub Desktop.
Save a csv somewhere in your windows. Download and install autoit, open the scite editor and paste the *auto_type_kra.au3* file below into it. Make sure your csv is store as c:\kra_vat.csv, click run and switch to the excel program
#include <File.au3>
WinWaitActive("Microsoft Excel (Product Activation Failed)")
$file = "c:\kra_vat.csv"
FileOpen($file, 0)
For $i = 1 to _FileCountLines($file)
$line = FileReadLine($file, $i)
; Send($line)
Local $CSVArray = StringSplit($line, ",")
For $index = 1 To $CSVArray[0]
Send($CSVArray[$index])
Send("{TAB}")
Next
Next
FileClose($file)
Local P051440732R TOPSERVE LTD 03/06/2019 779 FOODSTuFF 295.00
Local P051123223G NAIVAS LTD 03/06/2019 979 DETERGENT 595.00
@labeneator
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment