简体   繁体   中英

How to create a list from an CSV/xls file hosted online..?

I have a CSV file (can be converted to xls/txt) hosted online (skydrive), which i will be updating regularly to update the content of my app.

How do I convert that file into a list control?

The list should have following functions (every row will be a new item):

  1. Display the 1st column of the dedicated row as the list item.

  2. When clicked on the list item, Display the 2nd and 3rd coloumn into the new page.

  3. The string in the first column can be searched.(a search box above the list control)

I am new at wp7 programming, (don't yet have high programming skills).

It seems you need to do the following...

  • Create a webclient, and use DownloadString to get the file contents.
  • Create an object that holds the three values you want to use (probably 3 more strings in this example)
  • Parse the contents of the downloaded string to retrieve the values stored there, and use the values to populate a collection of the object type you created.
  • Bind the values in the collection to your listbox, displaying the first string in the list.
  • On selection changed, grab the selected instance from the collection, and pass that into your display page.

If you need specific help on these steps, please post some code and we can try to guide you on the specifics

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM