I have been working with a Perl script that uses the Net::Google::Drive::Simple module to interact with my Google Drive account. Everything works perfectly when I try to access regular files that I have uploaded or that others have shared with me. I can both view and download these files without any issues.
However, I am running into a problem with Google Sheets files. The module does not seem to detect any spreadsheet files that I have created myself or that have been shared with me by other users. These files are definitely present in my Drive when I check through the web interface.
Is this a limitation of the Net::Google::Drive::Simple module, or am I missing something in my approach? Should I be using different methods specifically designed for handling Google Sheets files? Any guidance would be helpful.
I encountered the exact same issue about six months ago when trying to build an automated backup system. The problem is that Google Sheets files exist as native Google Workspace documents rather than traditional downloadable files, so Net::Google::Drive::Simple handles them differently than regular uploaded files. What worked for me was switching to Google::API::Client with the Sheets API specifically. You need to set up separate authentication and use the spreadsheets.get method to access the actual sheet data. The Drive API will show these files if you filter by mimeType ‘application/vnd.google-apps.spreadsheet’ but you cannot download them directly like regular files. Consider using Google::RestApi::SheetsApi4 as an alternative - it made my workflow much smoother for handling spreadsheet operations.
This behavior occurs because Google Sheets are stored as proprietary Google document types, not as standard files that Net::Google::Drive::Simple was designed to handle. I faced similar confusion when migrating from local Excel processing to cloud-based sheets. The module essentially treats these as application objects rather than downloadable files, which explains why your regular file operations work fine but sheets remain invisible. You have two main paths forward: either use the Google Drive API directly with proper MIME type filtering to at least locate the sheets, or implement a dedicated Google Sheets API solution. From my experience, the latter approach proves more reliable for ongoing spreadsheet work since you get proper cell-level access and modification capabilities rather than trying to force Drive API compatibility.
yeah thats a known quirk with that module - google sheets arent really ‘files’ in the traditional sense so the drive api gets confused. ive had better luck just using the sheets api directly rather than trying to work around it. saves alot of headaches in the long run.