attach please a sample excel file and desired output
Hello there,
I can't seem to find a good example to search a config file and update this file from within an excel file.
Can VBA read and write from and to the same open file?
The excel file has a line for each personnel member. I want to update the config file for a Electronic Logbook I
keep for each of our workers.
So I need to look for a certain string in the config file after which the new member can be created.
Important: The new member can only be added after the line that starts with [Info].
The new member has always the same syntax with data from the excel file (see below).
The excel file has following data 1 per line
Name, Team, Phone Number, Male, INSS number
-------------------------------------------New Member---------------------------------------
[Mohamed]
Comment = Painter, Phone 0488/869416, Male, INSS 710356 011 58
----------------------------------------Config File: elogd.cfg -----------------------------------
[global]
port = 8080
SMTP host = relay.xxyyyzzz.com
Logbook dir = c:\DATA\Elog\logbooks
Type Record date = date
Preset Record date = $date
Date format = %d %m %Y
List Display = ID, Record date, Subject, Category
Start page = ?rsort=Record date
Default encoding = 0
Options Category = Leave, sickness, Salary, Question, Late, Evaluation
Extendable Options = Category
Reverse sort = 1
Quick filter = Date, Subject
Preset Author= Tim
[Info]
attach please a sample excel file and desired output
Tim, please have a read of this article: http://www.excelguru.ca/content.php?184
Ken Puls, FCPA, FCMA, MS MVP
Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!
Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter
If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.
Bookmarks