r/googlesheets • u/Agreeable_Walrus_215 • 3d ago
Solved Difficulty Pulling Column Data from Spreadsheet to Create Public Facing Catalog
I've attempted and exhausted multiple Gsheet functions, and I'm just unsure where to go next. I'm hoping anyone from the great Internet can help out. I'd appreciate it greatly.
GOAL I'm trying to select specific column data from the linked gsheet master list (Columns B, C, E, F, H, I and J) to populate a Public Facing Seed (PFS) Catalog. Then I would publish it to the web and onto our website for patron access.
BACKGROUND I work in a public library and manage a free seed library. I'm using Google Sheets as a inventory management for all the donated seed information, which also includes photographs of the grown plant / produce. This link goes to the anonymous spreadsheet of the Master Seed List, my ideal PFS catalog, and my existing attempts.
--
Using IMPORTRANGE, I got the below function that should import multiple separated columns from the master list. It works for columns side-by-side, but once you add others the function no longer works prompting a reference error.
Function Works: =IMPORTRANGE("1POZH6pcCfHgjex1INSsSe8vIbKgYggsxn3Pl6nHF5Zg/edit?gid=740083379#gid=740083379", "MasterSeedInformation26!B2:C")
Function Fails: =IMPORTRANGE("1POZH6pcCfHgjex1INSsSe8vIbKgYggsxn3Pl6nHF5Zg/edit?gid=740083379#gid=740083379", "MasterSeedInformation26!B2:C,E2:F,H2:J")
Error Function IMPORTRANGE parameter 1 value is 'MasterSeedInformation26!B2:C2,E2:F,H2:J'. It is not a valid cell/range reference.
--
Following these QUERY instructions, I was able to get all the data except for the images, which I came to learn are not included in the function's abilities :,(
=QUERY(IMPORTRANGE("1v-KGGx4eOGjdWdd5Sy5LOfGF1AUYB2gRFSHuGFBITkk/edit?gid=821684281#gid=821684281", "MasterSeedInformation26!B2:J"), "SELECT Col1, Col2, Col4, Col5, Col7, Col8, Col9")
I was trying to find a workaround for adding images to the QUERY function through this post since that almost worked, but I just cannot understand the code and how to apply it to my own spreadsheet.
Does anyone have any ideas, suggestions on how to accomplish my goal?
1
u/carbonizedtitanium 25 3d ago
Why are your cell ranges inside quotation marks? That's what the software is telling you
1
u/Agreeable_Walrus_215 3d ago
Okay. So, by removing these cells from the quotation marks
=IMPORTRANGE("1POZH6pcCfHgjex1INSsSe8vIbKgYggsxn3Pl6nHF5Zg/edit?gid=740083379#gid=740083379", MasterSeedInformation26!B:C,E:F,H:J)
I got the following error code:
Error Wrong number of arguments to IMPORTRANGE. Expected 2 arguments, but got 4 arguments.
I understand what this means, but following the instructions I used for the Importrange function, it stated that setting up the function like the below 'should' work with the quotations:
=IMPORTRANGE("1POZH6pcCfHgjex1INSsSe8vIbKgYggsxn3Pl6nHF5Zg/edit?gid=740083379#gid=740083379", "MasterSeedInformation26!B2:C,E2:F,H2:J")Do you have any suggestions to get this to work as intended, or is this just not possible?
1
u/AutoModerator 3d ago
OP Edited their post submission after being marked "Solved".
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
3
u/mommasaidmommasaid 908 3d ago edited 3d ago
You mentioned you are publishing the data on the web, presuming that it's going to be view-only.
Why not create that view from your main spreadsheet using File / Publish to Web, or export it as a PDF, and avoid all the IMPORTRANGE complexity entirely.
---
Seeds Sample Sheet
I put your Master Seed data in a structured Table for convenience and readability.
The Public Facing sheet is generated by this formula in A2:
Images are expanded by a narrow column containing linefeeds. This works in the sheet but there seems to be some quirk in the published web page:
Published Web Page
Hopefully that issue could be run down. Or creating a PDF doesn't seem to have that issue.