How to convert data to CSV or HTML format on iOS?

后端 未结 3 639
滥情空心
滥情空心 2020-12-10 09:31

In my application iOS I need to export some data into CSV or HTML format. How can I do this?

3条回答
  •  一整个雨季
    2020-12-10 10:21

    CSV - comma separated values.

    I usually just iterate over the data structures in my application and output one set of values per line, values within set separated with comma.

    struct person
    {
        string first_name;
        string second_name;
    };
    
    person tony = {"tony", "momo"};
    person john = {"john", "smith"};
    

    would look like

    tony, momo
    john, smith
    

提交回复
热议问题