Skip to main content
New Participant
Jul 18, 2023 12:53 PM UTC

Read Excel or CSV file from box drive using Java SDK

Hi , i am not able to read Excel or CSV file from box drive using Java SDK ,

Whenever I am trying to read using Java SDK its going to login page ,even I did authentication in the previous step but no luck

Is it really possible without downloading a file and directly reading from box drive.?
Or am I missing anything?

If so please guide me.

Thanks in advance,
SIVARAMAN A

3 replies

smartoneinok Box
Senior Developer Advocate
Jul 18, 2023 2:22 PM UTC

Hello!
Thanks for posting on the forum.

May I see the code you are running and perhaps some screenshots of what you are seeing?

Thanks!
Alex, Box Developer Advocate

Translate
New Participant
Jul 18, 2023 2:42 PM UTC

Thank you Alex for the quick response.

Sorry , we are not supposed to share the source code because of the organisation policy,.

do you have any example or Api documentation to go through for reference?

Translate
smartoneinok Box
Senior Developer Advocate
Jul 18, 2023 4:14 PM UTC

Understood! No worries.

We don’t have any sample code out there specifically reading files from Box Drive. I also have personally not tried doing that. I don’t see what it wouldn’t work though. You can probably use the FileInputStream method shown in the upload file sample section - alongside a path like the below. I got that path by just draging a file from box drive into my terminal window.

/Users/USERNAME/Library/CloudStorage/Box-Box/FILENAME.FILEEXTENSION
Translate