Reading file content from Azure Blob Storage
Hey devs,
I have a an excel file stored on blob storage. I need to read its content directly in a service. I have access to the direct download url for the file. Any leads on how to read its content?
14 Replies
So the question is how to read excel file?
seems like it
from a URL not a downloaded file in a directory
is it mandatory to inject the HttpClient into the service? This is a service linked to an API controller
you cant read file data from a url
you'll have to download it in some form or another
even if it's just to a temp folder
I see. That's what I needed to know. Thanks a lot.
You don't have to persist it, but you do have to download it. It can stay in a memory stream for example.
That's what I was trying to achieve. Download the file as stream into memory, and then get the data as byte[] without the need to download the file into the root directory.
Then do so?
As they mentioned earlier, you will still have to download it.
The excel parsing libraries won't be happy about it tho
Sure it will
I will look into it. As for the excel parsing libraries im using, they accept streams to parse the data. I don't know if this will be doable or not. Will see how it goes
It is doable. I've done it.
Perfect. Thanks a lot.