2/14/2024 0 Comments Xls to json![]() ![]() I haven't gone and made it super clean and generic, refactored out a bunch of helper functions, so I'm interested in your thoughts. It's really nice and it took less than an hour to get exactly what I wanted. I even blogged about getting data out of Excel into ASP.NET 16 years ago! One of my first jobs was automating Microsoft Excel with Visual Basic 3.0 with COM Automation. There's been ways to get data out of Excel for decades. Turns out there's a lovely open source project and NuGet package called ExcelDataReader. So I need some JSON and I have this Excel sheet. For now the "interface" for my app is JSON. ![]() I'll deal with the larger business process issue and/or system architecture and/or permissions issue later. The goal here is clean, reliable pragmatism. If the Excel sheet is on OneDrive/SharePoint/DropBox/whatever, I could have a small serverless function run when the files changes (or on a daily schedule) that would convert the Excel sheet into a JSON file and drop that file onto storage. Other alternative sources could be a JSON file sitting on a simple storage endpoint accessible with a single HTTP GET. For example, if I want to build a little app or one page website, yes, ideally I'd have a direct connection to the SQL back end. ![]() What's most important (after clean data) is that the process one builds around that authoritative source is reliable and repeatable. In real-world business scenarios, sometimes the authoritative source is an Excel sheet, sometimes it's a SQL database, and sometimes it's a flat file. Or, a data source at the very least! Additionally, since it was always going to end up as JSON in a cached in-memory database regardless, it doesn't matter much to me. This, of course, is sub-optimal, but regardless of how you feel about it, it's a database. I don't have access to the database that hosts the metadata and while I'm trying to get at least read-only access to it (long story) the best I can do is a giant Excel spreadsheet dump that I was given that has all the video details. I've been working on a little idea where I'd have an app (maybe a mobile app with Xamarin or maybe a SPA, I haven't decided yet) for the easily accessing and searching across the 500+ videos from ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |