ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

It is possible to data from topics in xslx file ?

asked 2017-09-06 09:17:05 -0500

Sol gravatar image

I had read subscriber to recieve data and now curious about save that data instead of real time in xslx format (not using bag files). Are there any ways to do it?

edit retag flag offensive close merge delete


Would a CSV file of some kind be okay? One that could be imported into Excel? If so generating CSV files directly in code is easy in C++ and Python (in Python you could use built-in CSV writers like numpy.savetxt or the CSV module).

jarvisschultz gravatar image jarvisschultz  ( 2017-09-06 09:35:11 -0500 )edit

There are also some tools for converting bag files to CSV (e.g. rosbag_to_csv) or rostopic echo -p -b <bagname> /topicname > <csvfilename>. If you need XLSX, you could look into something like xlswriter Python

jarvisschultz gravatar image jarvisschultz  ( 2017-09-06 09:50:31 -0500 )edit

I've used xlsxwriter to write xlsx files from a bag file and it's very easy to use.

jayess gravatar image jayess  ( 2017-09-06 12:57:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-09-08 10:18:03 -0500

jayess gravatar image

From the comments on your question by @jarvisschultz and myself, yes it is possible. You can use any library that writes xlsx files such as what @jarvisschultz suggested (XlsxWriter).

I've used XlsxWriter myself and it's quite easy. Just follow the tutorials from the documentation.

You can also use the Working with Excel Sheets Chapter from the book, Automate the Boring Stuff with Python, which uses openpyxl.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-09-06 09:17:05 -0500

Seen: 449 times

Last updated: Sep 08 '17