| View previous topic :: View next topic |
| Author |
Message |
adminsfs Newbie

Joined: 15 Feb 2007 Posts: 3
|
Posted: Mon Feb 26, 2007 4:52 pm Post subject: Calc / importing data / adding separate data to one sheet ? |
|
|
Hello,
Well, I've just figured out how to use "import sheet from file". Now can anyone tell me how to have each seperate file added to one sheet.
I import 50 data files at a time. I need to have each file added to one sheet, so I will end up with one sheet with ....300 names etc...
I cant seem to figure it out and "help" ..well that's why Iam here
Thank you,
Jeff H
jefjh@yahoo.com |
|
| Back to top |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Wed Feb 28, 2007 4:00 am Post subject: |
|
|
I think you have to copy and paste. You may be able to find and adapt script such as this. _________________ search forum by month |
|
| Back to top |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Tue Mar 06, 2007 5:10 pm Post subject: |
|
|
Hi, adminsfs. If you are not happy with an answer, post a follow up to the thread. Starting a new thread is confusing and wastes the time of other members. You cannot, in effect, spam the forum with your question. General Discussion is not the place, in any event, to ask a question about the spreadsheet.
Persevere with this thread. Thread 54034 is a blatant duplicate and I have deleted it.
BTW, I regularly run script which adds the latest version of a .csv file to a spreadsheet. It could be adapted to add different .csv files to a spreadsheet but you would have to provide more information about how the files to be added would be selected - i.e. do you want to use a file picker or can the file names be pre-determined.
If you want help with scripting, ask in Macros & API. This thread is in the right place, although I see that it should itself have been a follow up to an earlier thread. _________________ search forum by month |
|
| Back to top |
|
 |
adminsfs Newbie

Joined: 15 Feb 2007 Posts: 3
|
Posted: Tue Mar 06, 2007 6:10 pm Post subject: Reply > Thanks /Iwill will do what you ask ... |
|
|
| .. |
|
| Back to top |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Tue Mar 06, 2007 10:34 pm Post subject: |
|
|
Has anyone dealt with this situation or, at least, considered it? adminsfs suspects that the full truth may not have been revealed and he could, of course, be quite right.
Is there some other way of adding data from a series of .csv files to a single sheet in a spreadsheet? _________________ search forum by month |
|
| Back to top |
|
 |
TerryE Super User

Joined: 16 Jul 2006 Posts: 550 Location: UK
|
Posted: Thu Mar 08, 2007 4:35 pm Post subject: |
|
|
There is of course the option on doing the collate in the M$ or Linux file domain first by doing a concatinate of the CSV files to a temporary file and then importing it once.
If the CSVs have a header row thenyou may need to use a Filter/Copy to dump the copies, but that would still work out a LOT quicker //Terry |
|
| Back to top |
|
 |
noranthon Super User

Joined: 07 Jul 2005 Posts: 3318
|
Posted: Thu Mar 08, 2007 6:59 pm Post subject: |
|
|
Just to translate, I think that means merging the files before importing them into a Calc spreadsheet.
In Linux, I believe the command to use is cat. For Windows, I don't know. _________________ search forum by month |
|
| Back to top |
|
 |
TerryE Super User

Joined: 16 Jul 2006 Posts: 550 Location: UK
|
Posted: Fri Mar 09, 2007 1:37 am Post subject: |
|
|
The command is COPY /A src dst where [src] can either be a wildcard such as mydir\*.csv or a list file1.csv+file2.csv etc. Alternative you might want to do a FOR loop and append files by doing something like TYPE %%I >> dst. However in this case you might want to make sure that the dst file is empty first: IF EXIST dst DEL dst. Use HELP of these commanfs if you want to learn more.
And as N says under Linux you can do all this and more using cp and cat etc. _________________ Terry
WinXPSP3, OOo 2.4.1, Ubunto 8.04 for development
Also try the Official OOo Community Forum where I mainly post now. |
|
| Back to top |
|
 |
|