Skip to main content
Question

How to write dictionary values to an excel sheet

  • February 21, 2024
  • 2 replies
  • 216 views

Forum|alt.badge.img+1

In dictionary if i have key as “Name”,“Age”,“Id” and value as “Raju,Susha,Madhu” ,“21,22,23” ,“101,102,103”.how can i write this in to an excel as

NAME Age Id
Raju 21 101
Susha 22 102
Madhu 23 103
Can anyone please suggest how can i do this

2 replies

Zaid Chougle
Navigator | Tier 3
Forum|alt.badge.img+17
  • Navigator | Tier 3
  • February 21, 2024

In dictionary if i have key as “Name”,“Age”,“Id” and value as “Raju,Susha,Madhu” ,“21,22,23” ,“101,102,103”.how can i write this in to an excel as

NAME Age Id
Raju 21 101
Susha 22 102
Madhu 23 103
Can anyone please suggest how can i do this

You can use the loop → for each value in dictionary along with a counter initialization to write in down vertically.

 

Forum|alt.badge.img+1
  • Author
  • Cadet | Tier 2
  • February 21, 2024

I have not understood ..Can you please elaborate how to write down vertically..