[Solved] Calc File listing

Discuss the spreadsheet application
Post Reply
mandrill
Posts: 10
Joined: Mon Nov 28, 2011 12:00 pm

[Solved] Calc File listing

Post by mandrill »

Hi there, wasn't sure where to put this, feel free to move if necessary.

I'm currently working on preparing data for use in the backend of an e-commerce website and I need to make sure that I have the required images for each item that will be sold on the website. This is not something that can be done manually in a timely fashion (over 1800 items with 4 images each).

What I'd like to do is get a listing of every image file I have in a directory (and sub-dirs) and output that to a calc spreadsheet for comparison to the data I have for each item.

as far as I can see this would require a few steps.

1. Producing a spreadsheet which lists each file separated into columns for the image sizes (XL zoom, Lg, Med, sm)
2. Checking the list of items (each with a unique SKU) against each file name (XXXXX_<size>.jpg eg TW0373_xl.jpg) ignoring the size designation part of the filename)
3. Output a spreadsheet where each item is listed along with whether the relevant size image exists.

Steps 2 and 3 I can do but I can't figure out how to get the list of files in the first place. Any suggestions?

(I've had a look at other topics which seem to address this issue but they're not much help.)
Last edited by mandrill on Thu Apr 12, 2012 10:01 am, edited 1 time in total.
OOo 3.3.0 | Windows Vista Business 32bit SP2
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Calc File listing.

Post by acknak »

In Linux it's a snap; on Windows, I don't know. The same principle applies for both: use the command line to get a directory listing in a text file, then import the text file, but I don't know how to get the listing in a useful layout in WIndows, and I can't test it to make a suggestion. Maybe someone else can tell you.

Alternataively, if you can use a macro, this may do the trick: http://user.services.openoffice.org/en/ ... 21&t=41231
AOO4/LO5 • Linux • Fedora 23
User avatar
RoryOF
Moderator
Posts: 34610
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Calc File listing.

Post by RoryOF »

Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Hagar Delest
Moderator
Posts: 32650
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Calc File listing.

Post by Hagar Delest »

Does it help: DIRECTORY LIST - files or folders to Calc?
For installation, see Tutorial: How to install a code snippet.

Please add '[Solved]' at the beginning of your first post title (edit button) if your issue has been fixed.
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
mandrill
Posts: 10
Joined: Mon Nov 28, 2011 12:00 pm

Re: Calc File listing [Solved]

Post by mandrill »

Thanks guys. much appreciated. :D
OOo 3.3.0 | Windows Vista Business 32bit SP2
Post Reply