CSV到Plist转换IOS

时间:2014-04-21 20:57:55

标签: ios csv plist

我需要帮助将我的大型电子表格变成一个plist。我希望键名是字母表的字母,名称是值:

<plist version="1.0">
 <dict>
<key>A</key>
<array>
    <string>Amstel Light</string>
    <string>Anchor Porter</string>
    <string>Anchor Steam Beer</string>
    <string>Anheuser Busch Natural Light</string>
    <string>Asahi Draft Beer</string>
</array>
<key>B</key>
<array>
    <string>Ballentine India Pale Ale</string>
    <string>Ballentine Premium Lager</string>
    <string>Ballentine Private Stock Malt Liquor</string>
    <string>Ballentine XXX Ale </string>
    <string>Bass Bale Ale</string>
    <string>Beamish Irish Cream Stout</string>
    <string>Beamish Red Ale</string>
    <string>Beck Beer</string>
    <string>Big Barrell Australian Lager</string>
    <string>Black Horse Premium Draft Beer</string>
    <string>Blatz Beer</string>
    <string>Blatz Milwaukee 1851 Beer</string>
    <string>Boulder Porter</string>
    <string>Bud Light Beer</string>
    <string>Budweiser King of Beers</string>
    <string>Busch Beer</string>

我很遗憾不得不手动输入这些,但我的数据集现在很庞大,包含大约1000个值。我该如何自动执行此操作。我尝试在excel中编写一个Concatonate函数,它给了我正确语法的键,但由于格式化问题,我仍然无法轻松复制和粘贴它们,基本上它将整个值转换为一行,而使用键,然后数组将它变为四行... herokuapp方法也不会以我需要的方式创建密钥。任何帮助将不胜感激。

0 个答案:

没有答案