In terms of what this might refer to, we have a number of suggestions put forward by the commentaries (see the commentaries here for elaboration on the below suggestions). Here are some of the ones I saw that specifically relate these "excellent things" here to the number three (which is the translation found in the LXX and Vulgate, as well as many later translations):
Rashi (and many others) suggest that this refers to the Torah, Neviim and Ketuvim, or Pentateuch, Prophets, and Writings.
Malbim suggests that this refers to the three parts of Proverbs, as he splits it into Chapters 1-10, 11-25, 25-29, (see 1 Kings 5:12).
Gill and Barnes note those who believe that it refers to Solomon's three written contributions to the Hebrew Bible, namely the Books of Proverbs, Ecclesiastes, and Song of Songs.
Secondly (and more importantly to me), to establish the correct wording of the verse, and the source of the KJV's translation as "excellent things", the Hebrew text must be carefully analyzed. It reads:
הֲלֹ֤א כָתַ֣בְתִּֽי לְ֭ךָ [שָׁלִשִׁ֑ים] (שלשום) בְּמֹ֖עֵצ֣וֹת וָדָֽעַת׃
The Ketiv, or "written" word here is שלשום, whereas the Qere, or "read" word is שלשים. (See here for further explanation of Qere and Ketiv.)
While the root of both words is שלש, or three, both of them are used to mean very different things in the Bible.
שלשום (Strong's 8032) is found 24 other times throughout the Bible, is always grouped with תמול (Strong's 8543), and means the day before yesterday (which would be 3 days prior, counting inclusively, see comments here). Strong does count this as a 25th occurrence, and he adds the translation of "excellent things" under this entry, although, as noted above by enegue, he sources this to the KJV margin.
שלשים, if vowelized as it is here (Strong's 7991), can take a number of meanings:
- third part
- name of a measure
- a musical instrument
- maybe three-stringed, triangular shape, or three-barred
- perhaps a sistrum or triangle
- shield carrier, adjutant, officer, captain
Metzudat David understands this translation of "excellent things" to be related to the final definition of שלשים given above (as an excellent, honorable officer). He compares this to Proverbs 8:6:
שִׁ֭מְעוּ כִּֽי־נְגִידִ֣ים אֲדַבֵּ֑ר וּמִפְתַּ֥ח שְׂ֝פָתַ֗י מֵישָׁרִֽים׃
Hear; for I will speak of excellent things; and the opening of my lips shall be right things. (KJV)
As we can see, the KJV has "excellent things" here also, except that the Hebrew reads נגידים (Strong's 5057), which is another Hebrew word for officers.
Based on the above, the Qere of שלשים seems to be the likely motivation for the KJV translation of "excellent things".
For Enegue, but others as can read as well: See as well 1 Chronicles 11:11, which has a similar Qere and Ketiv. Strong (8675, added to that verse), notes the following:
In the Hebrew Bible, the scribes did not alter any text they felt had been copied incorrectly. Rather they noted in the margin what they thought the written text should be. The written variationiscalled a kethiv and the marginal note is called the qere. Where the translators of the Authorised Version followed the qere reading rather than the kethiv, we indicate the kethiv reading by the number 08675. For example, in Ge 24:33 "was set" is coded as H7760 08675 H3455 . The translators used the qere reading that has Strong's number H7760 but the kethiv reading is Strong's number H3455 . Both words have the same meaning, "was set".
Thus, I would guess that "[from the margin]" simply indicates that the translation is based on the Qere rather than the Ketiv, rather than to a marginal note that we do not have.