Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Function or VBA required to extract cell info from an unopened fil

We have about 5000 recipes in separate spreadsheets and i have been asked to
compile a list of the recipe names into a new spreadsheet.
I could open every individual recipe and copy/paste the filename into the
new spreadsheet but that will take forever.
Is there a way to tell the spreadsheet to look at the xls files and extract
the info required (the recipe name is always in the the same cell ref),
without openeing the files?
I have been informed from another group that VBA would be required and
that you can't get information out of a spreadsheet without opening it, but
that
opening can be done with screen updating off, so the user doesn't see it
happening.

Any help would be gratefully recieved
Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Function or VBA required to extract cell info from an unopened fil

Hi Nelly,

well... if they are within the same workbook or at least
within a few workbooks, the solution would be very simple.
but if they are all in another workbook which have
completely different names, this would be a little fuzzy...

However, I would use it that way:


Is there a way to tell the spreadsheet to look at the xls

files and extract
the info required (the recipe name is always in the the

same cell ref),
without openeing the files?


Not without opening, but with screen.updating off it would
work (as you write below)

i = 1
For Each cell In Range("targetrange")

cell.Value = Workbooks("sourcebook.xls").Sheets(i).Range
("sourcecell").Value
i = i + 1

Next cell

targetrange is the range where you want to write the
recipe names.
sourcecell is the cell within all the sheets where the
name is in.

If you have more than one workbook, you should use that
loop in a modified way..

Best

Markus



I have been informed from another group that VBA would be

required and
that you can't get information out of a spreadsheet

without opening it, but
that
opening can be done with screen updating off, so the user

doesn't see it
happening.

Any help would be gratefully recieved
Thanks

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Function or VBA required to extract cell info from an unopened fil

Hi Markus

First off, thanks for a swift reply.
Every single recipe is in it's own spreadsheet, is this going to make a big
difference to solving the problem?

Regards
Nelly

"Markus Scheible" wrote:

Hi Nelly,

well... if they are within the same workbook or at least
within a few workbooks, the solution would be very simple.
but if they are all in another workbook which have
completely different names, this would be a little fuzzy...

However, I would use it that way:


Is there a way to tell the spreadsheet to look at the xls

files and extract
the info required (the recipe name is always in the the

same cell ref),
without openeing the files?


Not without opening, but with screen.updating off it would
work (as you write below)

i = 1
For Each cell In Range("targetrange")

cell.Value = Workbooks("sourcebook.xls").Sheets(i).Range
("sourcecell").Value
i = i + 1

Next cell

targetrange is the range where you want to write the
recipe names.
sourcecell is the cell within all the sheets where the
name is in.

If you have more than one workbook, you should use that
loop in a modified way..

Best

Markus



I have been informed from another group that VBA would be

required and
that you can't get information out of a spreadsheet

without opening it, but
that
opening can be done with screen updating off, so the user

doesn't see it
happening.

Any help would be gratefully recieved
Thanks

.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default Function or VBA required to extract cell info from an unopened fil

Hi Nelly,


Every single recipe is in it's own spreadsheet, is this

going to make a big
difference to solving the problem?


Depends... the problem is that you cannot use a For Each
loop with workbooks like

For Each Workbook In Dir(pathname:="c:\whatever")...

so you should try to automatically open all workbooks
within the folder and then run the routine with every open
workbook... but for 5000 workbooks this may be hard...

I'm sorry to must tell you that I don't really know how to
go on... but I keep thinking about it.

Best

Markus


Regards
Nelly

"Markus Scheible" wrote:

Hi Nelly,

well... if they are within the same workbook or at

least
within a few workbooks, the solution would be very

simple.
but if they are all in another workbook which have
completely different names, this would be a little

fuzzy...

However, I would use it that way:


Is there a way to tell the spreadsheet to look at the

xls
files and extract
the info required (the recipe name is always in the

the
same cell ref),
without openeing the files?


Not without opening, but with screen.updating off it

would
work (as you write below)

i = 1
For Each cell In Range("targetrange")

cell.Value = Workbooks("sourcebook.xls").Sheets(i).Range
("sourcecell").Value
i = i + 1

Next cell

targetrange is the range where you want to write the
recipe names.
sourcecell is the cell within all the sheets where the
name is in.

If you have more than one workbook, you should use that
loop in a modified way..

Best

Markus



I have been informed from another group that VBA would

be
required and
that you can't get information out of a spreadsheet

without opening it, but
that
opening can be done with screen updating off, so the

user
doesn't see it
happening.

Any help would be gratefully recieved
Thanks

.


.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Function or VBA required to extract cell info from an unopened fil

So are all the spreadsheets in 1 directory.

If not, how can it be determined which spreadsheets have recipes and where
to look for them.

This sounds like a one time adventure. Why do you care whether users can
see them being opened? Aren't you the only user?

--
Regards,
Tom Ogilvy

"Nelly" wrote in message
...
Hi Markus

First off, thanks for a swift reply.
Every single recipe is in it's own spreadsheet, is this going to make a

big
difference to solving the problem?

Regards
Nelly

"Markus Scheible" wrote:

Hi Nelly,

well... if they are within the same workbook or at least
within a few workbooks, the solution would be very simple.
but if they are all in another workbook which have
completely different names, this would be a little fuzzy...

However, I would use it that way:


Is there a way to tell the spreadsheet to look at the xls

files and extract
the info required (the recipe name is always in the the

same cell ref),
without openeing the files?


Not without opening, but with screen.updating off it would
work (as you write below)

i = 1
For Each cell In Range("targetrange")

cell.Value = Workbooks("sourcebook.xls").Sheets(i).Range
("sourcecell").Value
i = i + 1

Next cell

targetrange is the range where you want to write the
recipe names.
sourcecell is the cell within all the sheets where the
name is in.

If you have more than one workbook, you should use that
loop in a modified way..

Best

Markus



I have been informed from another group that VBA would be

required and
that you can't get information out of a spreadsheet

without opening it, but
that
opening can be done with screen updating off, so the user

doesn't see it
happening.

Any help would be gratefully recieved
Thanks

.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Function or VBA required to extract cell info from an unopened fil

Hi Nelly

It isn't all that difficult to do this and the advice you received is
largely correct but if the files are scattered around different folders thats
more problematic, anyway other than opening them all together you can use the
file system to search for XLS files and open each one in turn checking its
name.

A few questions
A) Are they all in the same folder ?
B) Are they named similarly (EG Menu001, Menu002, etc) or in a pattern (EG
Menu*.XLS) ?


"Nelly" wrote:

We have about 5000 recipes in separate spreadsheets and i have been asked to
compile a list of the recipe names into a new spreadsheet.
I could open every individual recipe and copy/paste the filename into the
new spreadsheet but that will take forever.
Is there a way to tell the spreadsheet to look at the xls files and extract
the info required (the recipe name is always in the the same cell ref),
without openeing the files?
I have been informed from another group that VBA would be required and
that you can't get information out of a spreadsheet without opening it, but
that
opening can be done with screen updating off, so the user doesn't see it
happening.

Any help would be gratefully recieved
Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help: Extract some info. from a cell Bobsus5 Excel Worksheet Functions 1 March 7th 06 02:06 AM
Cell function required mickbarry Excel Worksheet Functions 6 February 7th 06 11:34 PM
How I can to extract a formula from other Cell Function? Tinjano Excel Discussion (Misc queries) 1 May 15th 05 08:24 PM
Function required to extract cell info from an unopened file. westcountrytractorboy Excel Worksheet Functions 4 February 10th 05 07:57 AM
Footer info from unopened workbook microfich Excel Programming 0 February 1st 05 01:15 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"