|
I guess to be more specific, I am getting
a comma delimited text file from a vendor. Some of the data in this file
has leading zeros. I need to open this file with Boston Workstation’s
Datastation to script the data into Meditech. When I run into errors with
the data, I would like to write those errors back to a file for an end user to
manually correct. The only DataStation option I know of to do that is
with and Excel file. If I could find a way to first convert the
comma delimited text file into an Excel file and keep the leading zeros, I
would be able to open that Excel file with DataStation and have the ability to
write errors back to it. I can manually open the text file with
Excel and get the import wizard, which gives me the option to format each
column as text. This will work, but it requires manually setting up the
file before running the script. Is there a way to convert that text file
to Excel formatting the columns as text through a script? From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neil Carman Using VB there are a couple of options If the first cell value in the column is
seen by Excel to be alpha, it will force additional cells in that column to be
alpha only. While creating your output file, prefix the at least the
first value with a single quote. The single quote will usually not
display on the screen and wouldn't require an edit later to remove an alpha
char. -----Original
Message----- I’m trying to find a way to convert text files
with values that contain leading zeros into Excel files that will keep those
leading zeros. I can manually do this via Excel’s Import wizard but
really need to find a way to script it. Command line, VB, something other
than manually! Is there any hope? Thanks! Paul Paul Brungardt Clinical Analyst HaysMedicalCenter PH: 785-623-2196 PG: 785-650-5989
--Neil CarmanDirector Technical DevelopmentManigault & Associates LLChttp://www.m-allc.comWork: (805) 680-5601Fax: (714) 968-5632 |
Important: This email and any attachments may contain confidential information subject to protection under the Federal Standards for Privacy of Individually Identifable Health Information (45 C.F.R. Parts 160 and 164). If you or your organization is a “Covered Entity” under the above mentioned regulations, you are obligated to treat such information in a manner consistent with the regulations. If it appears that this email was sent to you in error, (1) you are prohibited from utilizing or disseminating this email or any attachments; (2) please immediately delete it from your computer and any servers or other locations where it might be stored, and email this sender or call the Hays Medical Center Privacy Officer at (785) 623-2188 advising that you have done so. We appreciate your cooperation.
