Export Json Data as Excel file in Expo React-native

Hi guys,
I want to save all my history in Json array format like CSV or Excel file. I tried to use json2xls library but it seems that ‘React-native’ doesn’t recognized the ‘fs’ library, used for saving file.
Someone help me with this library or for another way?

hi @toavina - unforutnately fs is a node library that is not available in expo. But you can use the Expo filesystem api to fork/implement the approach used in json2xls.

1 Like

@toavina also if you plan on implementing the library and need to mess around with a lot of filesystem stuff, i made a tool for easily debugging your filesystem code. hope it helps!

@quinlanj can we do vice versa i.e. xlsx to json?

Hey @toavina, did you ever find a way to create and download a CSV file?