Re: VFP9SP2 & Excel automation -- how to enter this formula into a cell programatically from VFP?
Thanks, Fred. I was so close! On 2018-10-15 17:18, Fred Taylor wrote: ox.Cells(yourrow,yourcolumn).Formula = [=(NETWORKDAYS(A2,B2)-1)*("17:30"-"9:00")+MOD(B2,1)-MOD(A2,1)] Fred On Mon, Oct 15, 2018 at 2:06 PM wrote: I forgot to post the formula in text here: =(NETWORKDAYS(A2,B2)-1)*("17:30"-"9:00")+MOD(B2,1)-MOD(A2,1) I can't get that entered programatically from VFP. ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/bc8e1bbe30e4c73a54ada05bac5a3...@mbsoftwaresolutions.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: VFP9SP2 & Excel automation -- how to enter this formula into a cell programatically from VFP?
ox.Cells(yourrow,yourcolumn).Formula = [=(NETWORKDAYS(A2,B2)-1)*("17:30"-"9:00")+MOD(B2,1)-MOD(A2,1)] Fred On Mon, Oct 15, 2018 at 2:06 PM wrote: > I forgot to post the formula in text here: > > =(NETWORKDAYS(A2,B2)-1)*("17:30"-"9:00")+MOD(B2,1)-MOD(A2,1) > > I can't get that entered programatically from VFP. > > > > > On 2018-10-15 17:05, mbsoftwaresoluti...@mbsoftwaresolutions.com wrote: > > See screenshot: https://www.screencast.com/t/wzLweduy > > General scenario: 2 input datetime values, with output being the > > native Excel command NetworkDays result on those 2 cells using 9 a.m. > > to 5:30 p.m. bounds, giving me the time elapsed between DateTime1 and > > DateTime2. > > > > I want to supply a start and end time and use Excel's native > > NetworkDays function to return the length of time between when we > > received a ticket and when we responded. So basically I just want to > > use Excel's formula/calculation rather than recreate this in the Fox. > > Every time I tried to set it manually from the VFP command window, it > > failed. See screenshot with my attempts: > > https://www.screencast.com/t/BtzVOQLu > > > > My current workaround is to have a simple worksheet with the formula > > predefined in a cell and just populate the input datetimes and then > > grab the resulting calculation from that NetworkDays(..) cell. I feel > > like that's a kludge though, and I'd rather just invoke Excel and > > programatically do it raw. > > > > Your thoughts on how to best proceed for this task? > > > > tia, > > --Mike > [excessive quoting removed by server] ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/cajcbksqvazw2+aurdnzkr3p8og5o11etx7pcqxtq4ampxkz...@mail.gmail.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Re: VFP9SP2 & Excel automation -- how to enter this formula into a cell programatically from VFP?
I forgot to post the formula in text here: =(NETWORKDAYS(A2,B2)-1)*("17:30"-"9:00")+MOD(B2,1)-MOD(A2,1) I can't get that entered programatically from VFP. On 2018-10-15 17:05, mbsoftwaresoluti...@mbsoftwaresolutions.com wrote: See screenshot: https://www.screencast.com/t/wzLweduy General scenario: 2 input datetime values, with output being the native Excel command NetworkDays result on those 2 cells using 9 a.m. to 5:30 p.m. bounds, giving me the time elapsed between DateTime1 and DateTime2. I want to supply a start and end time and use Excel's native NetworkDays function to return the length of time between when we received a ticket and when we responded. So basically I just want to use Excel's formula/calculation rather than recreate this in the Fox. Every time I tried to set it manually from the VFP command window, it failed. See screenshot with my attempts: https://www.screencast.com/t/BtzVOQLu My current workaround is to have a simple worksheet with the formula predefined in a cell and just populate the input datetimes and then grab the resulting calculation from that NetworkDays(..) cell. I feel like that's a kludge though, and I'd rather just invoke Excel and programatically do it raw. Your thoughts on how to best proceed for this task? tia, --Mike ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/b2134e2f158208d38eb7ffaaac132...@mbsoftwaresolutions.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
VFP9SP2 & Excel automation -- how to enter this formula into a cell programatically from VFP?
See screenshot: https://www.screencast.com/t/wzLweduy General scenario: 2 input datetime values, with output being the native Excel command NetworkDays result on those 2 cells using 9 a.m. to 5:30 p.m. bounds, giving me the time elapsed between DateTime1 and DateTime2. I want to supply a start and end time and use Excel's native NetworkDays function to return the length of time between when we received a ticket and when we responded. So basically I just want to use Excel's formula/calculation rather than recreate this in the Fox. Every time I tried to set it manually from the VFP command window, it failed. See screenshot with my attempts: https://www.screencast.com/t/BtzVOQLu My current workaround is to have a simple worksheet with the formula predefined in a cell and just populate the input datetimes and then grab the resulting calculation from that NetworkDays(..) cell. I feel like that's a kludge though, and I'd rather just invoke Excel and programatically do it raw. Your thoughts on how to best proceed for this task? tia, --Mike ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/8e79d27643c3f13d5b98f025f72f8...@mbsoftwaresolutions.com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.