<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent posts to General Discussion</title><link>https://sourceforge.net/p/excelpython/discussion/general/</link><description>Recent posts to General Discussion</description><atom:link href="https://sourceforge.net/p/excelpython/discussion/general/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 10 Dec 2015 21:43:44 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/excelpython/discussion/general/feed.rss" rel="self" type="application/rss+xml"/><item><title>asynchronous excel udfs</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/630c69e3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Ark,&lt;/p&gt;
&lt;p&gt;This is not supported out-of-the-box right now, however you may be able to achieve a similar result by saving &lt;code&gt;Application.Caller&lt;/code&gt; and returning immediately from the UDF, then subsequently writing the result to the desired cell once it's ready.&lt;/p&gt;
&lt;p&gt;Perhaps in future better support for this kind of functionality will be available.&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Reynolds</dc:creator><pubDate>Thu, 10 Dec 2015 21:43:44 -0000</pubDate><guid>https://sourceforge.net9e458a052ddd691ce3cea9363aff1e9a3725dd9b</guid></item><item><title>asynchronous excel udfs</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/630c69e3/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi all,&lt;/p&gt;
&lt;p&gt;Just wonder if it is possible to create -asynchronous excel udfs in ExcelPython.&lt;br/&gt;
I have seen such a feature in ExcelDNA.&lt;br/&gt;
for example, we can create an UDF to call web services or a web request.&lt;br/&gt;
instead of waiting the function call to finish, it will return some state like 'processing'.&lt;br/&gt;
once the value is returned, it will automatically refresh the cell value via certain callback.&lt;/p&gt;
&lt;p&gt;thanks,&lt;br/&gt;
Ark&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ark Wu</dc:creator><pubDate>Tue, 08 Dec 2015 06:21:08 -0000</pubDate><guid>https://sourceforge.net7d0fe219b4ddc42b620d1a7aafb8630dedaeda60</guid></item><item><title>default values in udf</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/cd04bd45/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hello Ark,&lt;/p&gt;
&lt;p&gt;This feature is not currently in ExcelPython but I don't believe it would be difficult to implement. Currently ExcelPython is being integrated into xlwings, so we will probably &lt;a class="" href="https://github.com/ZoomerAnalytics/xlwings/issues/305" rel="nofollow"&gt;add this feature at a later stage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Thanks for the idea, kind regards,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Reynolds</dc:creator><pubDate>Tue, 24 Nov 2015 14:45:14 -0000</pubDate><guid>https://sourceforge.netdb251c364d61368db71986852db87422f2ab41ce</guid></item><item><title>default values in udf</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/cd04bd45/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;all,&lt;/p&gt;
&lt;p&gt;I just started trying ExcelPython, I found the concept is fantastic and it works quite well for me so far.&lt;br/&gt;
Just wonder if ExcelPython currently supports the default value in function (Optional Parameters in vba).&lt;br/&gt;
the example would be as follow:&lt;br/&gt;
in py file&lt;br/&gt;
@xlfunc&lt;br/&gt;
def test(a="Hello"):&lt;br/&gt;
  return a&lt;br/&gt;
in excel&lt;br/&gt;
the formula could be either =test() or =test("aaa").&lt;/p&gt;
&lt;p&gt;thanks for advance.&lt;/p&gt;
&lt;p&gt;Regards&lt;br/&gt;
Ark&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ark Wu</dc:creator><pubDate>Mon, 23 Nov 2015 06:47:22 -0000</pubDate><guid>https://sourceforge.net4ae35d38b5bcc1aa140c7cc06d75e9991b2e28e2</guid></item><item><title>Excel error values</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/ce1d0075/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Eric,&lt;/p&gt;
&lt;p&gt;Thank you very much for your reply. I tried the trick you suggested and it works. You are right that Excel values are read into Python as floats, even if the number itself has no fractional part. Nice workaround!&lt;/p&gt;
&lt;p&gt;Thanks again for the quick and very helpful reply, and of course for creating excelpython to begin with - it works very well and it is a great tool for bringing powerful Python functions into Excel. &lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;
Florin &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florin Dorobantu</dc:creator><pubDate>Thu, 30 Jul 2015 04:59:30 -0000</pubDate><guid>https://sourceforge.netf7061c644ddf2a3c25722912887fcb5e63e11607</guid></item><item><title>Excel error values</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/ce1d0075/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Florin,&lt;/p&gt;
&lt;p&gt;Yes I am aware of this problem - unfortunately there is little that can be done about it as long as ExcelPython is based on PyWin32, because it is this library that converts Excel error values (which actually arrive as a special variant type) to int.&lt;/p&gt;
&lt;p&gt;There is, however, a useful trick I can share with you: Excel cell values always arrive as floats, never as ints (if I remember correctly - please verify that this is indeed the case) so you know that if you get -2146826246 as an int, it's an error, whereas if you get -2146826246.0 as a float, it's the actual numerical value. In python you can test this with &lt;code&gt;type(x) is float&lt;/code&gt; and &lt;code&gt;type(x) is int&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Please let me know if this works for you.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Eric&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Reynolds</dc:creator><pubDate>Wed, 29 Jul 2015 07:17:53 -0000</pubDate><guid>https://sourceforge.net4b5dcc9764487426a1496fae55fdc881b10883c9</guid></item><item><title>Excel error values</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/ce1d0075/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I was wondering if there is a built-in method to handle Excel error values (#N/A, #VALUE etc.). I noticed that Python reads in those values as large negative integers. Specifically, (-2146826246, -2146826281, -2146826265, -2146826259, -2146826273, -2146826252) correspond to #N/A, #DIV/0!, #REF!, #NAME?, #VALUE!, and #NUM! respectively.&lt;/p&gt;
&lt;p&gt;As a workaround, I wrote a simple function that checks for these numerical values and handles them accordingly, but this approach has the obvious drawback that it does not distinguish between an error value and a numerical input equal to any of those negative numbers.&lt;/p&gt;
&lt;p&gt;Many thanks in advance for your thoughts.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Florin Dorobantu</dc:creator><pubDate>Fri, 24 Jul 2015 14:53:11 -0000</pubDate><guid>https://sourceforge.net16db6ffa9090939eb45a1a5e55c1660b0a5a672d</guid></item><item><title>Returning user types from UDFs</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/c9c6b332/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Eric, &lt;/p&gt;
&lt;p&gt;First of all, thanks for a fantastic library! It really couldn't have been easier to use.&lt;br /&gt;
I was wondering if it was possible to extend the server to allow UDFs to return custom types? I'm mostly interested in pandas' DataFrame and Series.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;br /&gt;
Alex&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alex Bass</dc:creator><pubDate>Wed, 13 May 2015 13:36:26 -0000</pubDate><guid>https://sourceforge.neta4ded9894493da7aba0f8c035230b0b63aec0660</guid></item><item><title>Using Python Objects in VBA</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/1a8ad1e1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Hi John,&lt;/p&gt;
&lt;p&gt;Thanks very much for your appreciative comments!&lt;/p&gt;
&lt;p&gt;So you should be able to use &lt;code&gt;Py.GetAttr(myObject, "attribute_name")&lt;/code&gt; to retrieve data members. FYI, to find out about the &lt;code&gt;Py.&lt;/code&gt; functions you have at your disposal to manipulate Python objects from VBA just take a look at the source code &lt;a class="" href="https://github.com/ericremoreynolds/excelpython/blob/master/addin/xlpython/xlpyserver.py#L211" rel="nofollow"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Hope this helps,&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Eric.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Eric Reynolds</dc:creator><pubDate>Wed, 29 Apr 2015 17:20:12 -0000</pubDate><guid>https://sourceforge.net3f6d2987ffd715ef732b40906bcc0310f85c202c</guid></item><item><title>Using Python Objects in VBA</title><link>https://sourceforge.net/p/excelpython/discussion/general/thread/1a8ad1e1/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;All,&lt;/p&gt;
&lt;p&gt;First, let me say that I cannot express how helpful this library is.  It has saved me a world of trouble in re-writing a number of python libraries that we have for excel in VBA, many of which use python libraries developed by others, which would be a nightmare.&lt;/p&gt;
&lt;p&gt;I am using ExcelPython to return a python dictionary of objects that I have built.  I can access the individual items in the dictionary using py.getitem and I can store them in a Variant or Object variable in VBA.  I was wondering if there was a way to access the data members of those objects.&lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;If all else fails, I can write the &lt;strong&gt;str&lt;/strong&gt; function of those objects to return the data in a dictionary-like format, which I probably should do anyway if I'm being a good python developer, use Py.Str(myObject) and parse the data from there.&lt;/p&gt;
&lt;p&gt;Thanks in advance!&lt;br /&gt;
John&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">John Rutter</dc:creator><pubDate>Wed, 29 Apr 2015 16:32:56 -0000</pubDate><guid>https://sourceforge.netdc50eed19b42dfb779726540fe2d46059543b8d1</guid></item></channel></rss>