C
C#3y ago
BokoGanga

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
Binto86
Binto863y ago
So the question is how to read excel file?
phaseshift
phaseshift3y ago
seems like it
BokoGanga
BokoGangaOP3y ago
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
phaseshift
phaseshift3y ago
you cant read file data from a url
Cisien
Cisien3y ago
you'll have to download it in some form or another even if it's just to a temp folder
BokoGanga
BokoGangaOP3y ago
I see. That's what I needed to know. Thanks a lot.
Yawnder
Yawnder3y ago
You don't have to persist it, but you do have to download it. It can stay in a memory stream for example.
BokoGanga
BokoGangaOP3y ago
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.
Yawnder
Yawnder3y ago
Then do so? As they mentioned earlier, you will still have to download it.
Binto86
Binto863y ago
The excel parsing libraries won't be happy about it tho
Yawnder
Yawnder3y ago
Sure it will
BokoGanga
BokoGangaOP3y ago
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
Yawnder
Yawnder3y ago
It is doable. I've done it.
BokoGanga
BokoGangaOP3y ago
Perfect. Thanks a lot.
Want results from more Discord servers?
Add your server