You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I experience a delay in pyclock ( random from 50 to 150 mls ) and, when the first yield is received in excel, the event calculate is not fired. Following yields normally trigger the event calculate.
sheet1
G10 = pyclock (10)
for cell G11 and G12 change format and use custom format hh.mm:ss.000
sheet 2
C10 = Sheet1!G11+Sheet1!G12+1
Save, close, reopen and press F9.
This is part of a more difficult issue that I am trying to debug where the event calculate triggers a macro ( I use VBA ) which copies the data received in another sheet of the same workbook. It works fine for a random time ( usually from 5 to 24 hrs ) then excel crashes and nothing is printed in the xloil log. The task manager does not show any problem for memory and cpu usage. Before copying I disable events and set calculation to manual. I suppose a thread conflict is the cause but I do not see any in my code. I am deconstructing and testing small part of it.
import xloil, datetime, asyncio
import pandas as pd
@xlo.func
async def pyclock (secs):
while True:
data_df = { 'time': [], 'event': [] }
time = datetime.datetime.now()
data_df['time'].append(time)
data_df['event'].append('data received')
data_df['time'].append(time)
data_df['event'].append('data received')
df = pd.DataFrame(data_df)
df = df.set_index('time')
yield df
await asyncio.sleep(secs)`
VBA code in sheet 2
Option Explicit
Private Sub Worksheet_Calculate()
MsgBox " calculate sheet 2"
End Sub
The text was updated successfully, but these errors were encountered:
xloil 0.18.7
Excel 64
I experience a delay in pyclock ( random from 50 to 150 mls ) and, when the first yield is received in excel, the event calculate is not fired. Following yields normally trigger the event calculate.
sheet1
G10 = pyclock (10)
for cell G11 and G12 change format and use custom format hh.mm:ss.000
sheet 2
C10 = Sheet1!G11+Sheet1!G12+1
Save, close, reopen and press F9.
This is part of a more difficult issue that I am trying to debug where the event calculate triggers a macro ( I use VBA ) which copies the data received in another sheet of the same workbook. It works fine for a random time ( usually from 5 to 24 hrs ) then excel crashes and nothing is printed in the xloil log. The task manager does not show any problem for memory and cpu usage. Before copying I disable events and set calculation to manual. I suppose a thread conflict is the cause but I do not see any in my code. I am deconstructing and testing small part of it.
The text was updated successfully, but these errors were encountered: