Bug 118218 - VBA FormatNumber function is unsupported
Summary: VBA FormatNumber function is unsupported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.1.0.4 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.2.0
Keywords: filter:xlsx
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2018-06-18 01:59 UTC by Aron Budea
Modified: 2018-06-30 07:44 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Sample XLSM (13.36 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-06-18 01:59 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2018-06-18 01:59:11 UTC
Created attachment 142832 [details]
Sample XLSM

Open the attached XLSM file. It contains a single macro call to FormatNumber VBA function [1] inside a user function, also referenced from A1.
Recalculate the spreadsheet.

=> There's an error during macro execution. I assume FormatNumber isn't supported.

BASIC runtime error.
'35'
FormatNumber

Observed using LO 6.1 beta1 & 4.4.0.3 / Windows 7.

[1] https://msdn.microsoft.com/en-us/vba/language-reference-vba/articles/formatnumber-function
http://www.excelfunctions.net/vba-formatnumber-function.html
Comment 1 raal 2018-06-18 15:12:55 UTC
Confirm. LO Version: 4.1.0.0.alpha1+ and 6.2
Comment 3 Mike Kaganski 2018-06-28 17:08:35 UTC
https://gerrit.libreoffice.org/56610
Comment 4 Commit Notification 2018-06-29 19:06:52 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=0f7a7c8e719dab6b79e24285b907b5be17f39fc8

tdf#118218: Implement FormatNumber VBA function

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2018-06-30 07:44:20 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7283125c563a2759f278c1caa6a7b71ade4f0101

tdf#118218: Make FormatNumber VBA-only

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.