Reading data from Excel document in a Swift app
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
add a comment |
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
add a comment |
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
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
swift excel firebase
asked Jul 14 '18 at 17:25
sinio
131210
131210
add a comment |
add a comment |
3 Answers
3
active
oldest
votes
1- Open Excel and export the file as CSV
2- Use this Link to read it as array
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
add a comment |
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.
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
add a comment |
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.
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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- Open Excel and export the file as CSV
2- Use this Link to read it as array
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
add a comment |
1- Open Excel and export the file as CSV
2- Use this Link to read it as array
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
add a comment |
1- Open Excel and export the file as CSV
2- Use this Link to read it as array
1- Open Excel and export the file as CSV
2- Use this Link to read it as array
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
add a comment |
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
add a comment |
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
add a comment |
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.
add a comment |
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.
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.
answered Nov 12 '18 at 14:08
Max Desiatov
1,49012127
1,49012127
add a comment |
add a comment |
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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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