Hello. I wanted to ask if anyone out there has had an success importing data from an Excel file into medical software or any other software using Winbatch and if you wouldn't mind sharing how you accomplished this? Thanks
I wrote WB code to fill out HCFA Claims and it used Excel. But at this point your question is too general. You need to provide specifics on the type of Excel files, i.e. are they in tabular format etc... and the destination ( database, web form etc...)
Hi Stanl,
Lets forget about excel file. I have attached a document in which contains some of the items that we're trying to import into our Meditech system using Winbatch. We're attempting to try to automate the process of posting payments into our system. I have listed my WB script below and I seem to get stuck at the "acct = StrTrim(StrSub (line,7,10)) SendKey(acct)" section. Winbatch script below does not produce an error message in Winbatch, however when it gets to the section of trying to pull in the Acct# a message pops up saying "This is a required field". lt's like the script is not finding the account number in the file. Thanks
TimeDelay (1)
handle=FileOpen("C:\remit-manager.txt","READ")
acct=""
line=FileRead(handle)
TimeDelay(3)
@wn=wingetactive()
SendKey('20')
SendKey('{ENTER}')
SendKey('8')
SendKey('{ENTER}')
SendKey('{t}')
SendKey('{ENTER}')
SendKey('{F9}')
SendKey('{2}')
SendKey('{ENTER}')
SendKey('{N}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{T}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{Y}')
SendKey('{ENTER}')
while @TRUE
acct = StrTrim(StrSub (line,65,7))
SendKey(acct)
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
TimeDelay(3)
endwhile
FileClose(handle)
This could work for you: http://www.winautomation.com/web-automation/
Quote from: cseymore on May 05, 2017, 12:30:42 PM
while @TRUE
acct = StrTrim(StrSub (line,65,7))
SendKey(acct)
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
SendKey('{ENTER}')
TimeDelay(3)
endwhile
FileClose(handle)
You likely have a focus problem and certainly have an infinite loop... If you have a recent version of WinBatch, you might want to consider using the new WinMacro if you choose to stick with your keystroke recording approach.
that we're trying to import into our Meditech system using Winbatch
so is this a database, or a web form or something else. I could see using sendkeys to go to a printer but WB has better methods to get data to db or the web. Also I would consider pre-parsing the .txt into a database table.