Hello Forum members
I am testing Hoteldruid and i am positive so far. Not being very technical in the field of php and html, I wonder if it is possible to import and export data with Hoteldruid.
I would like to import our existing client data into Hoteldruid. And i would need to export data from Hoteldruid to use this data for my bookkeeping program. Probably thus could work with Csv or text files using excel.
if anybody has experience or suggestions?
data import / exprot
Moderator: marco
-
- Posts: 7
- Joined: Tue Jun 02, 2015 2:53 pm
Re: data import / exprot
I can show you how I did the export of data. For the import of data, I don't have a suggestion for now.
I prepared a document, configured as follows:

So the format is TXT.
Multi-Language is off.
Extension for viewing and downloading the document: custom, .csv
Inside the document, I put two lines of text:
The first line represents the head of columns in the table I want to export. This is just a kind of name of the column. To delimit the columns, I have chosen the sign ";". So, in my case, the name of the first column is "surname", the name of the second column "occupied_unit" and so on.
In the second line, there are the fields I want to have in my table, also with ";" to delimit the columns. The [r] at the beginning of the line and the [/r] at the end of line will repeat this line for every reservation on the page. The [new_line] will help to have a new line for each reservation.
When I open a table with all reservations, or just the current reservations, I can now choose at the bottom of the page the document I prepared, ant click the View-button. My browser will then export the list as a CSV-file. This file can be opened with Excel or OpenOffice. To import the file in OpenOffice, I have to choose "UTF-8", and the correct separator ";".
Perhaps you will have to correct the date format (perhaps a date formatted like 03-07-2015 is not recognized as a date). What I do: I highlight the columns containing dates, and let the program search and replace the "-" by the correct character (search only in the highlighted columns).
This works for me for now. In the future, I want to change the date format directly in the document, using some custom variables, to avoid the "search and replace" part after opening the new document.
I prepared a document, configured as follows:

So the format is TXT.
Multi-Language is off.
Extension for viewing and downloading the document: custom, .csv
Inside the document, I put two lines of text:
Code: Select all
surname;occupied_unit;starting_date;ending_date;people_num_tot;periods_num;rate_name;rate_price;price_tot;paid;rest_to_pay;
[r][surname];[occupied_unit];[starting_date];[ending_date];[people_num_tot];[periods_num];[rate_name];[rate_price];[price_tot];[paid];[rest_to_pay];[new_line][/r]
In the second line, there are the fields I want to have in my table, also with ";" to delimit the columns. The [r] at the beginning of the line and the [/r] at the end of line will repeat this line for every reservation on the page. The [new_line] will help to have a new line for each reservation.
When I open a table with all reservations, or just the current reservations, I can now choose at the bottom of the page the document I prepared, ant click the View-button. My browser will then export the list as a CSV-file. This file can be opened with Excel or OpenOffice. To import the file in OpenOffice, I have to choose "UTF-8", and the correct separator ";".
Perhaps you will have to correct the date format (perhaps a date formatted like 03-07-2015 is not recognized as a date). What I do: I highlight the columns containing dates, and let the program search and replace the "-" by the correct character (search only in the highlighted columns).
This works for me for now. In the future, I want to change the date format directly in the document, using some custom variables, to avoid the "search and replace" part after opening the new document.
-
- Posts: 64
- Joined: Tue Sep 21, 2010 5:51 pm
Re: data import / exprot
that's awesome Martin.
Re: data import / exprot
Yes Martin, really awesome.
I used your solution for my purposes, nice!
Henry
I used your solution for my purposes, nice!
Henry
-
- Posts: 29
- Joined: Tue Jun 02, 2015 9:11 am
- Location: Rua José Alexandre 107 - Flecheiras, 62690.000 Trairi-CE, Brasil
Re: data import / exprot
Hi Martin,
That's nice, works as document for every single reservation like a charm. What I would love to have is some kind of bulky export, stating all reservation of a week or month that can be determined. This would help us with the countability and save much time.
On what concerns the date separator this can be solved in HotelDruid with custom variables which later can be assigned to your documents. The example for changing starting date with format 25-06-2099 into 25/06/2099 is
1. create a new custom variables with unique name (let's name it [my_starting_date])
2. Set up rule 'Put [my_starting_date] equal to [starting_date] replacing "-" with "/"
3. Change the variables in your documents from [starting_date] to [my_starting_date].
This can be done for all variables treating dates. It sounds complicated but is easier than one might believe.
Happy HotelDruiding and brgs
Andi
That's nice, works as document for every single reservation like a charm. What I would love to have is some kind of bulky export, stating all reservation of a week or month that can be determined. This would help us with the countability and save much time.
On what concerns the date separator this can be solved in HotelDruid with custom variables which later can be assigned to your documents. The example for changing starting date with format 25-06-2099 into 25/06/2099 is
1. create a new custom variables with unique name (let's name it [my_starting_date])
2. Set up rule 'Put [my_starting_date] equal to [starting_date] replacing "-" with "/"
3. Change the variables in your documents from [starting_date] to [my_starting_date].
This can be done for all variables treating dates. It sounds complicated but is easier than one might believe.
Happy HotelDruiding and brgs
Andi
-
- Posts: 29
- Joined: Tue Jun 02, 2015 9:11 am
- Location: Rua José Alexandre 107 - Flecheiras, 62690.000 Trairi-CE, Brasil
Re: data import / exprot
.. just to correct my last post:
I've found out that the export can be made for several bookings be accessing the month table und underneath of it choose the document that you want to execute. This gives a wonderful export of all bookings, rooms, financial info and so on in a csv file as Martin describes above.
For me, this one is sticky, most useful.
Happy HotelDruiding
Andi
I've found out that the export can be made for several bookings be accessing the month table und underneath of it choose the document that you want to execute. This gives a wonderful export of all bookings, rooms, financial info and so on in a csv file as Martin describes above.
For me, this one is sticky, most useful.
Happy HotelDruiding
Andi
Re: data import / exprot
Thanks a lot Martin for this script (and arrt for bringing up this subject), it's very useful. It shows the huge potential hoteldruid has.
Re: data import / exprot
Hello,
I hope to add a document to export data similar to this one to default documents in one of the next versions.
Regards,
Marco
I hope to add a document to export data similar to this one to default documents in one of the next versions.
Regards,
Marco
Problems installing, configuring, upgrading?
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Try the easiest way to use HotelDruid:
https://www.digitaldruid.net/hosted/index.php
Re: data import / exprot
Hi there,
Is anybody able to export also statistics from HotelDruid?
I'd like to to that, also because you can have statistics only for the last 5 years.
Thanks for any tip
Is anybody able to export also statistics from HotelDruid?
I'd like to to that, also because you can have statistics only for the last 5 years.
Thanks for any tip