How do I read a Base64 Url encoded string to excel?
See original GitHub issueI’m getting a xlsx attachment using the Gmail API https://developers.google.com/gmail/api/v1/reference/users/messages/attachments#resource
It returns it as a “The body data of a MIME message part as a base64url encoded string.”
I’m not sure how to read it?
XLSX.read(attachment, {type: 'base64'});
I get
TypeError: f.substr is not a function
How I do read this? Ultimately I want to convert that base64 format from Gmail to a JSON object.
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
ENCODEURL: Excel Formulae Explained - Causal
The function takes two arguments: the text string to encode and the encoding type. The encoding type can be either "url" or "base64"....
Read more >Base64 Encoding of "excel" - Online
Simply enter your data then push the encode button. ... Encode each line separately (useful for when you have multiple entries). Split lines...
Read more >How do I base64 encode a string efficiently using Excel VBA?
You can use the MSXML Base64 encoding functionality as described at www.nonhostile.com/howto-encode-decode-base64-vb6.asp: Function EncodeBase64(text As ...
Read more >ENCODEURL function - Microsoft Support
The ENCODEURL function returns a URL-encoded string, replacing certain non-alphanumeric characters with the percentage symbol (%) and a hexadecimal number.
Read more >Base64UrlEncoder Class (Microsoft.IdentityModel.Tokens)
Decode(String). Decodes the string from Base64UrlEncoded to UTF8. ; DecodeBytes(String). Converts the specified string, base-64-url encoded to utf8 bytes.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have an XLSX file on the server which I am trying to download. When I hit that url with axios call, I get very diff, random data as response. How do I convert it to normal xlsx data?
data : &��\���ad,��J������]bl��sM�E@�&ŵ�ͧ 0�� b�TC%̔Jba���4���8’��8oA��YRi ڨV�ߌ�,1/hK8�� K6�+�,�!��D���p�k�%���:v ��h’�T�)�!���c�O�j|�G�Q{����U�pb�n’(��!�R-W0@����W��0��u�I��;�YᲨ�ok>N0YЎ)����=�� Ç��W��/X�\�ZtZ�O�,ᴴ�YU��U����U���JI�]���’�M�b[��� i�Od
Data from response looks like this.
I had this problem and what I did was:
I get the same result that with the replace but I find it cleaner for reading.