2012-02-28 12 views
9

हाय
के साथ एक्सेल फ़ाइल प्रकार (xlsx) को कैसे जोड़ूं, मैंने प्रोजेक्ट बिल्ड में दस्तावेज़ प्रकार जोड़कर .xls फ़ाइलों को मेल ऐप बनाने में कामयाब रहा है और टाइप फ़ील्ड को "com.microsoft.excel" पर सेट किया है। एक्सएलएस "(स्क्रीन शॉट देखें)।
मैं xlsx फ़ाइलों के साथ ऐसा करना चाहता हूं लेकिन ऐसा नहीं कर सकता। मैं "com.microsoft.excel.xlsx" जोड़ने की कोशिश की, लेकिन यहमैं आईफोन एप्लिकेशन

enter image description here

+0

मैं इस मुद्दे में stell stucked हूँ !!! –

उत्तर

14

मैं हल काम नहीं किया है कि इस प्रकार के रूप में कस्टम यूटीआई को परिभाषित करते हुए। इन परिभाषाओं को अपनी info.plist में जोड़ने का प्रयास करें। यह उम्मीद के रूप में काम करता है।

<key>UTExportedTypeDeclarations</key> 
<array> 
    <dict> 
     <key>UTTypeDescription</key> 
     <string>XLSX input table document</string> 
     <key>UTTypeTagSpecification</key> 
     <dict> 
      <key>public.filename-extension</key> 
      <string>xlsx</string> 
      <key>public.mime-type</key> 
      <string>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</string> 
     </dict> 
     <key>UTTypeConformsTo</key> 
     <array> 
      <string>public.data</string> 
     </array> 
     <key>UTTypeIdentifier</key> 
     <string>com.mydomain.myapplication.xlsx</string> 
    </dict> 
</array> 

....

<key>CFBundleDocumentTypes</key> 
<array> 

    <dict> 
     <key>CFBundleTypeName</key> 
     <string>XLSX input table document</string> 
     <key>LSHandlerRank</key> 
     <string>Owner</string> 
     <key>CFBundleTypeRole</key> 
     <string>Editor</string> 
     <key>LSItemContentTypes</key> 
     <array> 
      <string>com.mydomain.myapplication.xlsx</string> 
     </array> 
    </dict> 
</array> 
0

XSLX पहले से ही घोषित किया जाता है के रूप में org.openxmlformats.presentationml.presentation

+1

वह पीपीटीएक्स है, एक्सएलएसएक्स नहीं। – Glorfindel

+0

और यहां तक ​​कि यदि आप इसे ऐसा करते हैं, तो यह तब तक काम नहीं करता जब तक आप कस्टम यूटीआई को डेविड के जवाब में नहीं जोड़ते। – Glorfindel

संबंधित मुद्दे