Using ChatGPT to create a spreadsheet
I’ve been exploring ways to use ChatGPT for various applications recently. There’s already been a lot of talk about how it helps write…
I’ve been exploring ways to use ChatGPT for various applications recently. There’s already been a lot of talk about how it helps write emails, create summaries for documents and even write the code for website. I’ve actually used it for all of these.
One of the new ways I’ve been trying it, is by getting it to create comma separated entries from a food and drink guidebook into a format used for a spreadsheet.
I then intended to take the spreadsheet and use it create a JSON file and then ultimately to make an API.
For now then, I’ll stick with the transposition.
The bonus is that you can use the 3.5 version of the AI model.
First, I give ChatGPT a role:
Can you act as a data entry expert and transpose some data for me? I will give you some text in the following format. Please write in English language.
Reply: Yes, I can certainly help with transposing data for you. Please provide me with the text that needs to be transposed and any instructions or formatting requirements you may have.
Prompt:
The format is as follows: first line is the [restaurant name], the second is [address], the address is [phone number]/[URL], fourth line is the [description]. Any line that starts with the word “Open” will contain the [opening times] from the word “Open” until the full stop at the end. Please arrange the data in the following format, [shop name], shops, , , [opening times], 1, [address], , [phone number], [URL],[description]:RESTAURANT NAME
12 Made Up Street, Bristol Area, BS1 1SB
0117 999 8877 / www.restaurantbristol.co.uk
Empty your restaurant with lots of wonderful dishes from its menu. The first of its kind in Bristol, which has seen several others open in its wake. Open Tue-Wed 9am-6pm, Thurs 11am-7pm, Fri 9am-6pm, Sat 10am-6pm, Sun 11am-4pm.
In GPT talk, the format is as follows:
First line: [restaurant name]
Second line: [address]
Third line: [phone number]/[URL]
Fourth line: [description]
Fifth line (if applicable): opening times starting with “Open” and ending with a full stop.
The responseI received was the following:
Bristol Restaurant, restaurants, , , Tue-Wed 9am-6pm, Thurs 11am-7pm, Fri 9am-6pm, Sat 10am-6pm, Sun 11am-4pm, 1, 12 Made Up Street, Bristol Area, BS1 1SB, 0117 999 8877, www.restaurantbristol.co.uk, Empty your restaurant with lots of wonderful dishes from its menu. The first of its kind in Bristol, which has seen several others open in its wake.
I plan to add the entries into a csv file and then import it.
This felt like pseudocoding. It was easy and gave me the result I wanted.
Do try it and see what you think.