Reading data from Excel document in a Swift app












2














I have an Excel document with some tables and a lot of data points. I'd like to read from it to populate some UICollectionView cells and other parts of my app.



Something like:



Country | Temperature | Cost
-----------------------------
Spain | 23 | 80
France | 26 | 60
Italy | 31 | 120


I'd like an external database so I can change the info without having to update the app. I use Firebase in my other apps but I don't want to rely on something I might have to pay for in the future.



So I was thinking of turning the Excel doc into a Google Sheet and reading from that using the API. But am I just making my life more difficult? It seems like a clunky solution.










share|improve this question



























    2














    I have an Excel document with some tables and a lot of data points. I'd like to read from it to populate some UICollectionView cells and other parts of my app.



    Something like:



    Country | Temperature | Cost
    -----------------------------
    Spain | 23 | 80
    France | 26 | 60
    Italy | 31 | 120


    I'd like an external database so I can change the info without having to update the app. I use Firebase in my other apps but I don't want to rely on something I might have to pay for in the future.



    So I was thinking of turning the Excel doc into a Google Sheet and reading from that using the API. But am I just making my life more difficult? It seems like a clunky solution.










    share|improve this question

























      2












      2








      2







      I have an Excel document with some tables and a lot of data points. I'd like to read from it to populate some UICollectionView cells and other parts of my app.



      Something like:



      Country | Temperature | Cost
      -----------------------------
      Spain | 23 | 80
      France | 26 | 60
      Italy | 31 | 120


      I'd like an external database so I can change the info without having to update the app. I use Firebase in my other apps but I don't want to rely on something I might have to pay for in the future.



      So I was thinking of turning the Excel doc into a Google Sheet and reading from that using the API. But am I just making my life more difficult? It seems like a clunky solution.










      share|improve this question













      I have an Excel document with some tables and a lot of data points. I'd like to read from it to populate some UICollectionView cells and other parts of my app.



      Something like:



      Country | Temperature | Cost
      -----------------------------
      Spain | 23 | 80
      France | 26 | 60
      Italy | 31 | 120


      I'd like an external database so I can change the info without having to update the app. I use Firebase in my other apps but I don't want to rely on something I might have to pay for in the future.



      So I was thinking of turning the Excel doc into a Google Sheet and reading from that using the API. But am I just making my life more difficult? It seems like a clunky solution.







      swift excel firebase






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jul 14 '18 at 17:25









      sinio

      131210




      131210
























          3 Answers
          3






          active

          oldest

          votes


















          1














          1- Open Excel and export the file as CSV



          2- Use this Link to read it as array






          share|improve this answer





















          • But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
            – sinio
            Jul 14 '18 at 17:33










          • upload it to server
            – Sh_Khan
            Jul 14 '18 at 17:33



















          0














          Excel is not precisely a database or a datastore. If you want an app then build an app - that means having a datastore/database and a User Interface, UI. As for updating data points you can automate that (preferable) or you can use your UI to manually update.






          share|improve this answer





















          • What would be a way of automating it? The data wouldn't be user data, but more like extra content.
            – sinio
            Jul 14 '18 at 18:06










          • If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
            – Ron Royston
            Jul 14 '18 at 19:21



















          0














          If you don't need to edit the Excel document and it's stored in the new XLSX format, there's an open-source library written in Swift that allows you to parse this file and read the cell data from it: CoreXLSX.






          share|improve this answer





















            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51341749%2freading-data-from-excel-document-in-a-swift-app%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            1- Open Excel and export the file as CSV



            2- Use this Link to read it as array






            share|improve this answer





















            • But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
              – sinio
              Jul 14 '18 at 17:33










            • upload it to server
              – Sh_Khan
              Jul 14 '18 at 17:33
















            1














            1- Open Excel and export the file as CSV



            2- Use this Link to read it as array






            share|improve this answer





















            • But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
              – sinio
              Jul 14 '18 at 17:33










            • upload it to server
              – Sh_Khan
              Jul 14 '18 at 17:33














            1












            1








            1






            1- Open Excel and export the file as CSV



            2- Use this Link to read it as array






            share|improve this answer












            1- Open Excel and export the file as CSV



            2- Use this Link to read it as array







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 14 '18 at 17:32









            Sh_Khan

            39.3k51125




            39.3k51125












            • But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
              – sinio
              Jul 14 '18 at 17:33










            • upload it to server
              – Sh_Khan
              Jul 14 '18 at 17:33


















            • But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
              – sinio
              Jul 14 '18 at 17:33










            • upload it to server
              – Sh_Khan
              Jul 14 '18 at 17:33
















            But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
            – sinio
            Jul 14 '18 at 17:33




            But this would be importing it to the Swift app, and accessing it that way. I wouldn't be able to edit the information without updating the app.
            – sinio
            Jul 14 '18 at 17:33












            upload it to server
            – Sh_Khan
            Jul 14 '18 at 17:33




            upload it to server
            – Sh_Khan
            Jul 14 '18 at 17:33













            0














            Excel is not precisely a database or a datastore. If you want an app then build an app - that means having a datastore/database and a User Interface, UI. As for updating data points you can automate that (preferable) or you can use your UI to manually update.






            share|improve this answer





















            • What would be a way of automating it? The data wouldn't be user data, but more like extra content.
              – sinio
              Jul 14 '18 at 18:06










            • If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
              – Ron Royston
              Jul 14 '18 at 19:21
















            0














            Excel is not precisely a database or a datastore. If you want an app then build an app - that means having a datastore/database and a User Interface, UI. As for updating data points you can automate that (preferable) or you can use your UI to manually update.






            share|improve this answer





















            • What would be a way of automating it? The data wouldn't be user data, but more like extra content.
              – sinio
              Jul 14 '18 at 18:06










            • If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
              – Ron Royston
              Jul 14 '18 at 19:21














            0












            0








            0






            Excel is not precisely a database or a datastore. If you want an app then build an app - that means having a datastore/database and a User Interface, UI. As for updating data points you can automate that (preferable) or you can use your UI to manually update.






            share|improve this answer












            Excel is not precisely a database or a datastore. If you want an app then build an app - that means having a datastore/database and a User Interface, UI. As for updating data points you can automate that (preferable) or you can use your UI to manually update.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jul 14 '18 at 18:02









            Ron Royston

            5,77032538




            5,77032538












            • What would be a way of automating it? The data wouldn't be user data, but more like extra content.
              – sinio
              Jul 14 '18 at 18:06










            • If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
              – Ron Royston
              Jul 14 '18 at 19:21


















            • What would be a way of automating it? The data wouldn't be user data, but more like extra content.
              – sinio
              Jul 14 '18 at 18:06










            • If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
              – Ron Royston
              Jul 14 '18 at 19:21
















            What would be a way of automating it? The data wouldn't be user data, but more like extra content.
            – sinio
            Jul 14 '18 at 18:06




            What would be a way of automating it? The data wouldn't be user data, but more like extra content.
            – sinio
            Jul 14 '18 at 18:06












            If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
            – Ron Royston
            Jul 14 '18 at 19:21




            If the data source does not have a means to push on update, you'll have to stand up a server, maybe a node.js server, to periodically ask the endpoint what it's got.
            – Ron Royston
            Jul 14 '18 at 19:21











            0














            If you don't need to edit the Excel document and it's stored in the new XLSX format, there's an open-source library written in Swift that allows you to parse this file and read the cell data from it: CoreXLSX.






            share|improve this answer


























              0














              If you don't need to edit the Excel document and it's stored in the new XLSX format, there's an open-source library written in Swift that allows you to parse this file and read the cell data from it: CoreXLSX.






              share|improve this answer
























                0












                0








                0






                If you don't need to edit the Excel document and it's stored in the new XLSX format, there's an open-source library written in Swift that allows you to parse this file and read the cell data from it: CoreXLSX.






                share|improve this answer












                If you don't need to edit the Excel document and it's stored in the new XLSX format, there's an open-source library written in Swift that allows you to parse this file and read the cell data from it: CoreXLSX.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 12 '18 at 14:08









                Max Desiatov

                1,49012127




                1,49012127






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f51341749%2freading-data-from-excel-document-in-a-swift-app%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Florida Star v. B. J. F.

                    Danny Elfman

                    Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues