'Is there a way to export a txt file in a cell like an image with AG Grid's excel export function?
I see a lot of information about exporting an image (jpg, png, gif) to an excel file with AG Grid, but nothing on something like a txt file. I am trying to get the contents of a txt file into a cell like an image can. My txt file is converted (just like an image) to base64, and I am using it in a UI to display its contents.
Does anyone know if/how AG Grid can export this kind of data?
Ex: data:text/txt;base64,... works in my UI just like data:image/png;base64,... but in AG Grid I am only able to export the image and not that txt file.
Solution 1:[1]
So I found that all I have to do to display the contents of the log file (logFile) (which I pull from my Postgres DB as Bytea) is run that through String.fromCharCode(logFile) and throw that in AG Grid as a multiline entry.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jessica Wentling |
