Greetings,
I saw that post that Mitch Lawrence sent awhile back and thought you're
all set - sorry J
Here I modified Mitch's routine so that you pass it a workbook number
and below it an illustration of how this would be called etc.
------------------------------------------------------------------------
------------------------------------------------------------------------
------------
Public Sub createBDS(XLSFileFullPath As String, workbook As Integer)
'This routine checks for the excel file in the specified location
'Check for config file and create a template if it doesn't exist
ConfigFileFullPath = XLSFileFullPath & workbook & ".bds"
If Dir(ConfigFileFullPath) = "" Then
strText = "[general]" & Chr(10)
strText = strText & "takelabels=True" & Chr(10)
strText = strText & "header=Top" & Chr(10)
strText = strText & "worksheet=" & workbook & Chr(10)
strText = strText & "directupdate=True" & Chr(10)
strText = strText & "filetype=5"
'Could add further info here in a similar way such as field names and
report config.
Open ConfigFileFullPath For Output As #1
Print #1, strText
Close #1
End If
End Sub
Sub test()
maxworkbooks = 2
For i = 1 To maxworkbooks
createBDS "C:\DataFile/multisheet.xlsx", (i)
D.Open_ "C:\DataFile/multisheet.xlsx", ftExcel,
"c:\DataFile\multisheet.xlsx" & i & ".bds"
'script the file
D.Close_
Next i
End Sub
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com <http://www.bossoft.com/>
Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx>
LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.
From: [email protected] [mailto:[email protected]]
Sent: Monday, August 10, 2009 9:12 AM
To: Talk
Subject: [talkbws] RE: Procedural scripting multiple worksheets
Hi Thom -
Do you anticipate being able to post an example of option #2 soon?
Thanks.
Jennifer Shwajlyk
Clinical Programmer Analyst, RN
Nathan Littauer Hospital & Nursing Home
(518)775-4185
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 2:27 PM
To: [email protected]
Subject: [talkbws] RE: Procedural scripting multiple worksheets
Greetings,
Well I can think of two approaches that can be done pretty easily
programmatically:
1. A preprocessor that consolidates all the worksheets into a
single large WorkSheet in a separate .xls file
2. "Dynamically" creating a .bds file and changing the
"worksheet= " inside the newly created file to reference the next needed
Worksheet.
Option #2 is the easier of the two. Got some stuff going on today - but
could get an example of this posted to the website probably in a day or
so?
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com <http://www.bossoft.com/>
Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx>
LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 2:16 PM
To: Talk
Subject: [talkbws] RE: Procedural scripting multiple worksheets
The script needs to enter the data within the worksheets into Meditech.
Each worksheet contains codes for a new mnemonic that need to be entered
in a dictionary within Meditech. The worksheets are all formatted the
same way.
Jennifer Shwajlyk
Clinical Programmer Analyst, RN
Nathan Littauer Hospital & Nursing Home
(518)775-4185
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 2:08 PM
To: [email protected]
Subject: [talkbws] RE: Procedural scripting multiple worksheets
Greetings,
What exactly does the script need to do with all 70 of these worksheets?
Are they all the same format?
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com <http://www.bossoft.com/>
Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx>
LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 2:07 PM
To: Talk
Subject: [talkbws] RE: Procedural scripting multiple worksheets
Hi Thom -
This sounds like quite a daunting task since I have about 70 worksheets
in each spreadsheet. Is there any way programmatic way to streamline the
process? Can you either refer me to documentation or provide an example?
Each worksheet is formatted the same way.
Thanks.
Jennifer Shwajlyk
Clinical Programmer Analyst, RN
Nathan Littauer Hospital & Nursing Home
(518)775-4185
________________________________
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 1:48 PM
To: [email protected]
Subject: [talkbws] RE: Procedural scripting multiple worksheets
Greetings,
Sure - you can use any type of scripting you want for this : )
The main thing is - and this is very important!
You will need to configure separate .bds files for each worksheet and
each d.open_ command must specify a .bds file
A worksheet inside a workbook is from the DataStation's and a script's
perspective a separate file.
Regards,
Thom
Thom C. Blackwell
Product Manager
Boston Software Systems
(866) 653-5105 ex 807
www.bossoft.com <http://www.bossoft.com/>
Sign up for my weekly webinar!
<http://www.bostonworkstation.com/customer_center/special_events.aspx>
LEGAL NOTICE Unless expressly stated otherwise, this message is
confidential and may be privileged. It is intended for the addressee(s)
only. Access to this E-mail by anyone else is unauthorized. If you are
not an addressee, any disclosure or copying of the contents of this
E-mail or any action taken (or not taken) in reliance on it is
unauthorized and may be unlawful. If you are not an addressee, please
inform the sender immediately, then delete this message and empty from
your trash.
From: [email protected] [mailto:[email protected]]
Sent: Wednesday, August 05, 2009 1:44 PM
To: Talk
Subject: [talkbws] Procedural scripting multiple worksheets
I need to create a data entry script that uses an Excel spreadsheet that
contains 70 worksheets. Does anyone know if it is possible to use
procedural scripting to accomplish this?
TIA,
Jennifer Shwajlyk
Clinical Programmer Analyst, RN
Nathan Littauer Hospital & Nursing Home
(518)775-4185
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk
.aspx
---
To post a message to this list, send mail to: [email protected]
You are currently subscribed as: [email protected]
Unsubscribe in the customer center on our website:
http://www.bostonworkstation.com/customer_center/virtual_user_group_talk.aspx