Martin, why do you not advice this? For performance reasons? You mean the beancount text parser will work faster, than code, which reads Excel and outputs beancount transactions?
The reason I want to keep source data in spreadsheet is that because it is easier for me to work with them. I can filter things, re-assign categories to massive amount of rows at the same time etc. On Monday, May 25, 2020 at 3:17:37 AM UTC+2, Martin Blais wrote: > > I wouldn't suggest that; probably better to produce the text file from > your spreadsheets via a script. > Also, you can use xlrd to read Excel spreadsheets. > Furthermore, it's possible to use Google sheets as well if you prefer all > this stuff online, there's some examples in the codebase. > > > > On Sun, May 24, 2020 at 7:49 AM Chary Chary <char...@gmail.com > <javascript:>> wrote: > >> Uwe Ziegenhagen, >> >> thanks! >> >> I think you are talking about converting files to beancount text format, >> but I wanted to create a plugin which dumps data directly into the RAM in a >> format of beamcount transactions objects. >> >> On Sunday, May 24, 2020 at 1:13:47 PM UTC+2, Uwe Ziegenhagen wrote: >>> >>> Well, I would use the pandas library to read the Excel files. Then you >>> just need to iterate over those rows and create the Beancount syntax. I >>> have started similar work by using pandas to store the data I had read from >>> Quicken files, see the github >>> https://github.com/UweZiegenhagen/PyQIF-Parser >>> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2FUweZiegenhagen%2FPyQIF-Parser&sa=D&sntz=1&usg=AFQjCNGHSMmSQlBfBbNrkXPFtle98mNmJQ>. >>> >>> Your task may be a bit easier as you do not have to parse the QIF file >>> first, you already have the Excel. For you the following function inside >>> PyQifParser.py could be interesting >>> >>> >>> def to_beancount(self, outputfile): >>> """ >>> Exports the transactions, accounts, classifications and >>> categories from pandas dataframe into an Excel-file >>> @TODO: waits for detailed specifications, currency is still hardwired >>> """ >>> self.transactions['bcdate'] = self.transactions['Date'].dt.strftime( >>> '%Y-%m-%d') >>> with open(outputfile, "w", encoding="utf-8") as writer: >>> for entry in self.transactions.index: >>> writer.write(self.transactions['bcdate'][entry] + ' * "' + str(self. >>> transactions['Description'][entry])[:50] + '"\n') >>> writer.write('\t' + self.transactions['Category'][entry] + '\t'*10 + str >>> (self.transactions['Amount'][entry]) + ' EUR\n') >>> writer.write('\t' + self.transactions['Category'][entry] + '\t'*10 + str >>> (-1 * self.transactions['Amount'][entry]) + ' EUR\n\n') >>> >>> >>> >>> >>> Am So., 24. Mai 2020 um 12:52 Uhr schrieb Chary Chary <char...@gmail.com >>> >: >>> >>>> >>>> Dear all, >>>> >>>> can you please comment on the following my idea. >>>> >>>> I keep all my data in Excel spreadsheets and I am kind of hesitant to >>>> move it all to text format. >>>> >>>> Let us say for simplicity I have the following spreadsheets >>>> >>>> >>>> - >>>> >>>> Euro paying account >>>> - >>>> >>>> USD paying account >>>> - >>>> >>>> Cash spending spreadsheet (for all currencies). I use >>>> https://toshl.com/ for this. >>>> >>>> >>>> In each of these spreadsheets I use the same set of categories to >>>> assign to transactions (e.g. grosseries, entertainment etc). >>>> >>>> So my idea is to keep data in these spreadsheets, but to use beancount >>>> to pull data together, and analyze this all together. I assume, that I may >>>> be adding some limited transactions in traditional beancount textual >>>> format (e.g. to link transfers between accounts) >>>> >>>> To achieve this I propose to write plugins, which will read Excel file >>>> and return entries in beancount format. >>>> >>>> Any thoughts on this? >>>> >>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Beancount" group. >>>> To unsubscribe from this group and stop receiving emails from it, send >>>> an email to bean...@googlegroups.com. >>>> To view this discussion on the web visit >>>> https://groups.google.com/d/msgid/beancount/4db1ccc9-6e45-43d0-88ca-762d3868f0da%40googlegroups.com >>>> >>>> <https://groups.google.com/d/msgid/beancount/4db1ccc9-6e45-43d0-88ca-762d3868f0da%40googlegroups.com?utm_medium=email&utm_source=footer> >>>> . >>>> >>> >>> >>> -- >>> Dr. Uwe Ziegenhagen >>> 0179-7476050 >>> <http://www.uweziegenhagen.de> >>> >> -- >> You received this message because you are subscribed to the Google Groups >> "Beancount" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to bean...@googlegroups.com <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beancount/3ed8b8ec-100c-47cd-ac5f-0f4373506af7%40googlegroups.com >> >> <https://groups.google.com/d/msgid/beancount/3ed8b8ec-100c-47cd-ac5f-0f4373506af7%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/e3fe2d27-6178-493c-ac2d-09c2c5aebc75%40googlegroups.com.