I tried to parse an Excel file and process it using Excelize. I only have a URL link that can be used to access the file.
For my case, I tested using a file I uploaded to Dropbox. The url from dropbox is like this www.dropbox.com/s/t537135761/filename.xlsx, but somehow when I try to use this link, the Excelize throws off this error:
open: www.dropbox.com/s/t537135761/filename.xlsx: no such file or directory
The file itself is already open for public. I can browse it on incognito mode so it means it's not because of restricted access problem. It has the extension file on the URL so I assume the URL touches the actual file that can be parsed by Excelize
I'm not sure if the problem is on Dropbox itself or is on Excelize, but that's only the cloud storage I can use to test my code.
Anyone can tell me how to use Excelize to open file using URL link? I tried searching for another function but can't find anything.
This is roughly my code (simplified) for testing.
package main
func main() {
var urlLink = "www.dropbox.com/s/t537135761/filename.xlsx"
exlz, err := excelize.OpenFile(urlLink)
if err != {
fmt.Println(err)
return
}
defer func() {
if err = exlz.Close(); err != nil {
fmt.Println(err)
}
}
return
}