DislikedThanks for your reply. Is there a command to close Excel. And reopen the read and close.Ignored
MT4 to Excel through Excel RTD (Finally!) 609 replies
Connecting two Metatrader to Excel with DDE ? 22 replies
MetaTrader and Excel using DDE 8 replies
Metatrader + Excel 1 reply
Looking for Help with using Excel and MetaTrader 4 5 replies
DislikedThanks for your reply. Is there a command to close Excel. And reopen the read and close.Ignored
DislikedHi. Is it possible to export all of data price (Bid/Ask/Time/High/Low) from MT5 to Excel ? If so, is there any program or way that i can export that thing? Because, i tried to looking for the program, but i can't found it. Thank youIgnored
Disliked{quote} Outside of this, create a script that writes out the values to csv, then just import it into excel. That's the easiest (a million or so tutorials out on google to do that).Ignored
Disliked{quote} Could you please tell me the keywords? because i don't understand. I tried to looking for the program in MQL5 forum, just found this program https://www.mql5.com/en/code/1246 . And again, after i tried to apply in my mt5, it works. but, i can't see the Bid/Ask of it. Could you please help me ? Thanks in advance. Stay safe and have a great day.Ignored
DislikedHi Thanks, it works But is there a function to do the save and close from inside the code? Or should I save manually?Ignored
Disliked{quote} Hello , I have managed to pull data to excel its really great thank you . a couple of questions from please : 1- Is it possible to change file type from xlsx , to xlsm ( macro enabled ) ? I have tried to change on the expert test dll but with no luck . 2- I am having a problem in displaying the bar date in DD/MM/YYYY , instead of DD.MM.YYY , Can anyone help with the below input so it brings up DD/MM/YYYY PutStr(TimeToStr(Time[0+1],TIME_DATE|TIME_MINUTES),"Sheet2","A3"); the display for it looks : 2021.06.03 19:27 what I want it to...Ignored
MqlDateTime mydate; TimeToStruct(Time[0+1]); string strValue=(int)IntegerToString(mydate.year)+"/"+ (int)IntegerToString(mydate.mon)+"/"+ (int)IntegerToString(mydate.day)+"/ "+ (int)IntegerToString(mydate.hour)+":"+ (int)IntegerToString(mydate.min); PutStr(strValue,"Sheet2","A3");
DislikedHello everyone, I have tried all the previously mentioned suggestions for error, but none seems to work: 2021.06.17 15:34:35.786 Unhandled exception 0xE0434352 2021.06.17 15:34:33.564 test dll GBPCAD,M1: initialized 2021.06.17 15:34:29.870 test dll GBPCAD,M1 inputs: xlsfile=C:\Users\Kalyan\Desktop\mt4excel\mt4.xls; logfile=C:\Users\Kalyan\Desktop\mt4excel\log.txt; \ Log file says : Error on PutDouble_intidx: System.Runtime.InteropServices.COMException (0x800AC472): Exception from HRESULT: 0x800AC472 at System.RuntimeType.ForwardCallToInvokeMember(String...Ignored
[DllExport] public static void Deinitialize([MarshalAs(UnmanagedType.LPWStr)] string whereToLog) { try { LogFile = whereToLog; excelWorkbook.Close(0); excelApp.Quit(); } catch (Exception e) { WriteMe(Error on Initialize + e); throw; } }
DislikedHi, I compiled your source code on VS 2019 successfully, but got an error as attachment. Any clue pls? I intend to implement this to close the Excel at the end [DllExport] public static void Deinitialize([MarshalAs(UnmanagedType.LPWStr)] string whereToLog) { try { LogFile = whereToLog; excelWorkbook.Close(0); excelApp.Quit(); } catch (Exception e) { WriteMe(Error on Initialize + e); throw; } } {image}Ignored
DislikedIt's simple really. 1. Put MetatraderToExcel.mqh in your include folder 2. Put test dll.mq4 in your experts folder 3. Put the dll contained in the zip file in your libraries folder (the libraries folder under your MQL4 directory). 4. Review the test dll.mq4 file. There are 3 "put" functions and 3 "get" functions. Each with 3 overloads. The overloads are on how you want to address each cell. The 2 inputs that are used is: 1. Where is the excel file you're going to be writing to 2. Where do you want to write any errors the DLL generates to Some notes:...Ignored
DislikedIt's simple really. 1. Put MetatraderToExcel.mqh in your include folder 2. Put test dll.mq4 in your experts folder 3. Put the dll contained in the zip file in your libraries folder (the libraries folder under your MQL4 directory). 4. Review the test dll.mq4 file. There are 3 "put" functions and 3 "get" functions. Each with 3 overloads. The overloads are on how you want to address each cell. The 2 inputs that are used is: 1. Where is the excel file you're going to be writing to 2. Where do you want to write any errors the DLL generates to Some notes:...Ignored