Added dbf reader

This commit is contained in:
Patrick Fic
2020-10-13 15:34:09 -07:00
parent 6dddd4bdf0
commit abfb91d55f
2 changed files with 14 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
const { DBFFile } = require("dbffile");
async function DecodeEstimate(filePath) {
//Path to AD1
let dbf = await DBFFile.open("C:\\VPS\\EMS\\687_3_A.LIN");
console.log(`DBF file contains ${dbf.recordCount} records.`);
console.log(`Field names: ${dbf.fields.map((f) => f.name).join(", ")}`);
let records = await dbf.readRecords(100);
for (let record of records) console.log(record);
}
exports.DecodeEstimate = DecodeEstimate;

View File

@@ -36,10 +36,10 @@ export function App() {
<div>Welcome to your new react app. asdas sd</div>
<Button
onClick={() => {
ipcRenderer.send("test-start", { test: true });
ipcRenderer.send("test", { test: true });
}}
>
Test IPC
TEST Generic IPC
</Button>
<Button
onClick={() => {